Skip to content

Commit 59f0ac1

Browse files
committed
fix: use Optional syntax for typer commands
1 parent 570ca0a commit 59f0ac1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

robotoff/cli/triton.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
from typing import Optional
2+
13
import typer
24

35
app = typer.Typer()
46

57

68
@app.command()
7-
def load_model(model_name: str, model_version: str | None = None):
9+
def load_model(model_name: str, model_version: Optional[str] = None):
810
"""Load a model in Triton Inference Server.
911
1012
If the model was never loaded, it will be loaded with the default
@@ -45,7 +47,7 @@ def list_models():
4547

4648

4749
@app.command()
48-
def get_model_config(model_name: str, model_version: str | None = None):
50+
def get_model_config(model_name: str, model_version: Optional[str] = None):
4951
"""Display the configuration of a model in Triton Inference Server."""
5052
from robotoff import triton
5153

0 commit comments

Comments
 (0)