diff --git a/src/diracx/cli/__init__.py b/src/diracx/cli/__init__.py index c77a7a1b..abd72074 100644 --- a/src/diracx/cli/__init__.py +++ b/src/diracx/cli/__init__.py @@ -4,6 +4,7 @@ import json import os from datetime import datetime, timedelta, timezone +from typing import Optional from typer import Option @@ -21,8 +22,10 @@ @app.async_command() async def login( vo: str, - group: str | None = None, - property: list[str] | None = Option(None, help="Override the default(s) with one or more properties"), + group: Optional[str] = None, # noqa: UP007 + property: Optional[list[str]] = Option( # noqa: UP007 + None, help="Override the default(s) with one or more properties" + ), ): scopes = [f"vo:{vo}"] if group: @@ -77,7 +80,7 @@ async def logout(): @app.callback() -def callback(output_format: str | None = None): +def callback(output_format: Optional[str] = None): # noqa: UP007 if "DIRACX_OUTPUT_FORMAT" not in os.environ: output_format = output_format or "rich" if output_format is not None: