We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7abf3c7 commit 76f9741Copy full SHA for 76f9741
ulid/__main__.py
@@ -1,3 +1,5 @@
1
+from __future__ import annotations
2
+
3
import argparse
4
import shutil
5
import sys
@@ -7,7 +9,6 @@
7
9
from datetime import datetime
8
10
from functools import partial
11
from typing import Any
-from typing import Optional
12
from uuid import UUID
13
14
import ulid
@@ -97,7 +98,7 @@ def main(argv: Sequence[str], prog: str | None = None) -> str:
97
98
return args.func(args)
99
100
-def from_value_or_stdin(value: str, convert: Optional[Callable[[str], Any]] = None) -> Any:
101
+def from_value_or_stdin(value: str, convert: Callable[[str], Any] | None = None) -> Any:
102
value = sys.stdin.readline().strip() if value == "-" else value
103
if convert is not None:
104
return convert(value)
0 commit comments