We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c055f40 commit ae9ddd5Copy full SHA for ae9ddd5
tests/test_annotated.py
@@ -1,8 +1,8 @@
1
-from pathlib import Path
2
-
+import sys
3
import typer
4
from typer.testing import CliRunner
5
from typing_extensions import Annotated
+from pathlib import Path
6
7
from .utils import needs_py310
8
@@ -84,7 +84,10 @@ def test_annotated_custom_path():
84
app = typer.Typer()
85
86
class CustomPath(Path):
87
- pass
+ # Subclassing Path was not fully supported before 3.12
88
+ # https://docs.python.org/3.12/whatsnew/3.12.html
89
+ if sys.version_info < (3, 12):
90
+ _flavour = type(Path())._flavour
91
92
@app.command()
93
def custom_parser(
0 commit comments