Skip to content

Commit 2428596

Browse files
Typer>=0.12.4 supports Union types (#164)
## Description See #163. Typer now supports union types post fastapi/typer#548. It turns out that we have a lower bound on `typer`, i.e., we already support `typer>0.13`, so this PR just fixes the type annotations.
1 parent 438b59b commit 2428596

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pyodide_build/cli/build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44
import tempfile
55
from pathlib import Path
6-
from typing import Optional, cast, get_args
6+
from typing import cast, get_args
77
from urllib.parse import urlparse
88

99
import requests
@@ -122,7 +122,7 @@ def source(
122122

123123
# simple 'pyodide build' command
124124
def main(
125-
source_location: Optional[str] = typer.Argument( # noqa: UP007 typer does not accept list[str] | None yet.
125+
source_location: str | None = typer.Argument(
126126
"",
127127
help="Build source, can be source folder, pypi version specification, "
128128
"or url to a source dist archive or wheel file. If this is blank, it "
@@ -164,7 +164,7 @@ def main(
164164
compression_level: int = typer.Option(
165165
6, help="Compression level to use for the created zip file"
166166
),
167-
config_setting: Optional[list[str]] = typer.Option( # noqa: UP007 typer does not accept list[str] | None yet.
167+
config_setting: list[str] | None = typer.Option(
168168
None,
169169
"--config-setting",
170170
"-C",

0 commit comments

Comments
 (0)