Skip to content

Commit f451c5f

Browse files
authored
Use PEP-604 in CLI module (#103)
1 parent 9fa7ef6 commit f451c5f

File tree

3 files changed

+63
-13
lines changed

3 files changed

+63
-13
lines changed

pdm.lock

+60-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ requires-python = ">=3.11"
4242
dependencies = [
4343
"pydantic>=2.5.2",
4444
"httpx>=0.25.0",
45-
"typer[all]>=0.9.0",
45+
"typer[all]>=0.12.4",
4646
"structlog>=24.1.0",
4747
"rich>=13.7.0",
4848
"orjson>=3.9.13",

src/anycastd/_cli/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55
from enum import StrEnum, auto
66
from pathlib import Path
7-
from typing import Annotated, Optional, assert_never
7+
from typing import Annotated, assert_never
88

99
import orjson
1010
import structlog
@@ -98,7 +98,7 @@ def version_callback(value: bool) -> None:
9898
@app.callback()
9999
def main(
100100
version: Annotated[
101-
Optional[bool],
101+
bool | None,
102102
typer.Option(
103103
"--version",
104104
help=version_callback.__doc__,

0 commit comments

Comments
 (0)