Skip to content

Commit c3c8090

Browse files
committed
Fix annotations in tests on py39
1 parent 11787d8 commit c3c8090

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/test_from_fixtures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def fixture_file_path(filename: str) -> str:
1212

1313

1414
ExampleVariables = uritemplate.variable.VariableValueDict
15-
ExampleTemplatesAndResults = t.List[t.Tuple[str, str | t.List[str]]]
15+
ExampleTemplatesAndResults = t.List[t.Tuple[str, t.Union[str, t.List[str]]]]
1616

1717

1818
class ExampleWithVariables(t.TypedDict):
@@ -30,7 +30,7 @@ def load_examples(filename: str) -> Examples:
3030
return examples
3131

3232

33-
def expected_set(expected: t.List[str] | str) -> t.Set[str]:
33+
def expected_set(expected: t.Union[t.List[str], str]) -> t.Set[str]:
3434
if isinstance(expected, list):
3535
return set(expected)
3636
return {expected}

tests/test_uritemplate.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111

1212
def merge_dicts(
13-
*args: variable.VariableValueDict
14-
| t.Dict[str, str]
15-
| t.Dict[str, t.List[str]]
13+
*args: t.Union[
14+
variable.VariableValueDict, t.Dict[str, str], t.Dict[str, t.List[str]]
15+
]
1616
) -> variable.VariableValueDict:
1717
d: t.Dict[str, variable.VariableValue] = {}
1818
for arg in args:
@@ -21,7 +21,7 @@ def merge_dicts(
2121

2222

2323
ExampleVariables = variable.VariableValueDict
24-
ExampleTemplatesAndResults = t.List[t.Tuple[str, str | t.List[str]]]
24+
ExampleTemplatesAndResults = t.List[t.Tuple[str, t.Union[str, t.List[str]]]]
2525

2626

2727
class ExampleWithVariables(t.TypedDict):

0 commit comments

Comments
 (0)