Skip to content

Commit 8197b14

Browse files
committed
lint
1 parent f2e84aa commit 8197b14

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

openapi_python_client/parser/properties/union.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from __future__ import annotations
22

3+
from collections import OrderedDict
4+
from collections.abc import Mapping
35
from itertools import chain
4-
from typing import Any, ClassVar, Mapping, OrderedDict, cast
6+
from typing import Any, ClassVar, cast
57

68
from attr import define, evolve
79

tests/test_parser/test_properties/test_union.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Dict, List, Optional, Tuple, Union
1+
from typing import Optional, Union
22

33
import pytest
44
from attr import evolve
@@ -45,11 +45,11 @@ def test_property_from_data_union(union_property_factory, date_time_property_fac
4545

4646
def _make_basic_model(
4747
name: str,
48-
props: Dict[str, oai.Schema],
48+
props: dict[str, oai.Schema],
4949
required_prop: Optional[str],
5050
schemas: Schemas,
5151
config: Config,
52-
) -> Tuple[ModelProperty, Schemas]:
52+
) -> tuple[ModelProperty, Schemas]:
5353
model, schemas = ModelProperty.build(
5454
data=oai.Schema.model_construct(
5555
required=[required_prop] if required_prop else [],
@@ -75,7 +75,7 @@ def _make_basic_model(
7575

7676
def _assert_valid_discriminator(
7777
p: Union[Property, PropertyError],
78-
expected_discriminators: List[Tuple[str, Dict[str, Class]]],
78+
expected_discriminators: list[tuple[str, dict[str, Class]]],
7979
) -> None:
8080
assert isinstance(p, UnionProperty)
8181
assert p.discriminators

0 commit comments

Comments
 (0)