mirror of
https://github.com/onyx-and-iris/vban-cli.git
synced 2026-04-16 02:23:30 +00:00
annotate optional args as Optional.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Annotated
|
||||
from typing import Annotated, Optional
|
||||
|
||||
from cyclopts import App, Argument, Parameter
|
||||
|
||||
@@ -28,7 +28,7 @@ def launcher(
|
||||
|
||||
@app.command(name='level')
|
||||
def level(
|
||||
new_level: Annotated[float, Argument()] = None,
|
||||
new_level: Annotated[Optional[float], Argument()] = None,
|
||||
*,
|
||||
strip_index: Annotated[int, Parameter(parse=False)],
|
||||
gainlayer_index: Annotated[int, Parameter(parse=False)],
|
||||
@@ -38,7 +38,7 @@ def level(
|
||||
|
||||
Parameters
|
||||
----------
|
||||
new_level : float
|
||||
new_level : float, optional
|
||||
If provided, sets the level to this value. If not provided, the current level is printed.
|
||||
"""
|
||||
if new_level is None:
|
||||
|
||||
Reference in New Issue
Block a user