From 7c46e63fd8e79713787ed877ca960c8448ad12ee Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Wed, 6 Sep 2023 15:11:17 +0200 Subject: [PATCH] fix: fix for https://github.com/tiangolo/typer/issues/533 --- src/diracx/cli/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/diracx/cli/__init__.py b/src/diracx/cli/__init__.py index bf4119cc..34039d48 100644 --- a/src/diracx/cli/__init__.py +++ b/src/diracx/cli/__init__.py @@ -1,3 +1,5 @@ +# ruff: noqa: UP007 # because of https://github.com/tiangolo/typer/issues/533 + from __future__ import annotations import asyncio @@ -22,8 +24,8 @@ @app.async_command() async def login( vo: str, - group: str | None = None, - property: list[str] | None = Option( + group: Optional[str] = None, + property: Optional[list[str]] = Option( None, help="Override the default(s) with one or more properties" ), ): @@ -81,7 +83,7 @@ async def logout(): @app.callback() -def callback(output_format: str | None = None): +def callback(output_format: Optional[str] = None): if "DIRACX_OUTPUT_FORMAT" not in os.environ: output_format = output_format or "RICH" if output_format is not None: