Skip to content

Commit

Permalink
fix: workaround for tiangolo/typer#533
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Sep 4, 2023
1 parent 7680ed2 commit 574e7c8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/diracx/cli/__init__.py
Expand Up @@ -4,6 +4,7 @@
import json
import os
from datetime import datetime, timedelta, timezone
from typing import Optional

from typer import Option

Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 574e7c8

Please sign in to comment.