diff --git a/end_to_end_tests/golden-record/my_test_api_client/types.py b/end_to_end_tests/golden-record/my_test_api_client/types.py index 230efea92..599eeb9f5 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/types.py +++ b/end_to_end_tests/golden-record/my_test_api_client/types.py @@ -1,12 +1,12 @@ """ Contains some shared types for properties """ from http import HTTPStatus -from typing import BinaryIO, Generic, MutableMapping, Optional, Tuple, TypeVar +from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar import attr class Unset: - def __bool__(self) -> bool: + def __bool__(self) -> Literal[False]: return False diff --git a/integration-tests/integration_tests/types.py b/integration-tests/integration_tests/types.py index 230efea92..599eeb9f5 100644 --- a/integration-tests/integration_tests/types.py +++ b/integration-tests/integration_tests/types.py @@ -1,12 +1,12 @@ """ Contains some shared types for properties """ from http import HTTPStatus -from typing import BinaryIO, Generic, MutableMapping, Optional, Tuple, TypeVar +from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar import attr class Unset: - def __bool__(self) -> bool: + def __bool__(self) -> Literal[False]: return False diff --git a/openapi_python_client/templates/types.py.jinja b/openapi_python_client/templates/types.py.jinja index c746db6e1..cfb990d85 100644 --- a/openapi_python_client/templates/types.py.jinja +++ b/openapi_python_client/templates/types.py.jinja @@ -1,12 +1,12 @@ """ Contains some shared types for properties """ from http import HTTPStatus -from typing import Any, BinaryIO, Generic, MutableMapping, Optional, Tuple, TypeVar +from typing import Any, BinaryIO, Generic, MutableMapping, Optional, Tuple, TypeVar, Literal import attr class Unset: - def __bool__(self) -> bool: + def __bool__(self) -> Literal[False]: return False