Skip to content

Commit 56b8773

Browse files
committed
fix: Regression on Any types
1 parent ebda606 commit 56b8773

23 files changed

+45
-47
lines changed

end_to_end_tests/golden-record/my_test_api_client/api/default/get_common_parameters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from http import HTTPStatus
2-
from typing import Any, Dict, Optional, Union
2+
from typing import Any, Dict, Optional, Union, cast
33

44
import httpx
55

@@ -35,7 +35,7 @@ def _get_kwargs(
3535

3636
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
3737
if response.status_code == HTTPStatus.OK:
38-
response_200 = None
38+
response_200 = cast(Any, None)
3939
return response_200
4040
if client.raise_on_unexpected_status:
4141
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")

end_to_end_tests/golden-record/my_test_api_client/api/default/post_common_parameters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from http import HTTPStatus
2-
from typing import Any, Dict, Optional, Union
2+
from typing import Any, Dict, Optional, Union, cast
33

44
import httpx
55

@@ -35,7 +35,7 @@ def _get_kwargs(
3535

3636
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
3737
if response.status_code == HTTPStatus.OK:
38-
response_200 = None
38+
response_200 = cast(Any, None)
3939
return response_200
4040
if client.raise_on_unexpected_status:
4141
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")

end_to_end_tests/golden-record/my_test_api_client/api/location/get_location_header_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from http import HTTPStatus
2-
from typing import Any, Dict, Optional, Union
2+
from typing import Any, Dict, Optional, Union, cast
33

44
import httpx
55

@@ -54,7 +54,7 @@ def _get_kwargs(
5454

5555
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
5656
if response.status_code == HTTPStatus.OK:
57-
response_200 = None
57+
response_200 = cast(Any, None)
5858
return response_200
5959
if client.raise_on_unexpected_status:
6060
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")

end_to_end_tests/golden-record/my_test_api_client/api/location/get_location_query_optionality.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import datetime
22
from http import HTTPStatus
3-
from typing import Any, Dict, Optional, Union
3+
from typing import Any, Dict, Optional, Union, cast
44

55
import httpx
66

@@ -59,7 +59,7 @@ def _get_kwargs(
5959

6060
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
6161
if response.status_code == HTTPStatus.OK:
62-
response_200 = None
62+
response_200 = cast(Any, None)
6363
return response_200
6464
if client.raise_on_unexpected_status:
6565
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")

end_to_end_tests/golden-record/my_test_api_client/api/parameter_references/get_parameter_references_path_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from http import HTTPStatus
2-
from typing import Any, Dict, Optional
2+
from typing import Any, Dict, Optional, cast
33

44
import httpx
55

@@ -45,7 +45,7 @@ def _get_kwargs(
4545

4646
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
4747
if response.status_code == HTTPStatus.OK:
48-
response_200 = None
48+
response_200 = cast(Any, None)
4949
return response_200
5050
if client.raise_on_unexpected_status:
5151
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")

end_to_end_tests/golden-record/my_test_api_client/api/parameters/delete_common_parameters_overriding_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from http import HTTPStatus
2-
from typing import Any, Dict, Optional, Union
2+
from typing import Any, Dict, Optional, Union, cast
33

44
import httpx
55

@@ -36,7 +36,7 @@ def _get_kwargs(
3636

3737
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
3838
if response.status_code == HTTPStatus.OK:
39-
response_200 = None
39+
response_200 = cast(Any, None)
4040
return response_200
4141
if client.raise_on_unexpected_status:
4242
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")

end_to_end_tests/golden-record/my_test_api_client/api/parameters/get_common_parameters_overriding_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from http import HTTPStatus
2-
from typing import Any, Dict, Optional
2+
from typing import Any, Dict, Optional, cast
33

44
import httpx
55

@@ -36,7 +36,7 @@ def _get_kwargs(
3636

3737
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
3838
if response.status_code == HTTPStatus.OK:
39-
response_200 = None
39+
response_200 = cast(Any, None)
4040
return response_200
4141
if client.raise_on_unexpected_status:
4242
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")

end_to_end_tests/golden-record/my_test_api_client/api/parameters/get_same_name_multiple_locations_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from http import HTTPStatus
2-
from typing import Any, Dict, Optional, Union
2+
from typing import Any, Dict, Optional, Union, cast
33

44
import httpx
55

@@ -44,7 +44,7 @@ def _get_kwargs(
4444

4545
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
4646
if response.status_code == HTTPStatus.OK:
47-
response_200 = None
47+
response_200 = cast(Any, None)
4848
return response_200
4949
if client.raise_on_unexpected_status:
5050
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")

end_to_end_tests/golden-record/my_test_api_client/api/parameters/multiple_path_parameters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from http import HTTPStatus
2-
from typing import Any, Dict, Optional
2+
from typing import Any, Dict, Optional, cast
33

44
import httpx
55

@@ -34,7 +34,7 @@ def _get_kwargs(
3434

3535
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
3636
if response.status_code == HTTPStatus.OK:
37-
response_200 = None
37+
response_200 = cast(Any, None)
3838
return response_200
3939
if client.raise_on_unexpected_status:
4040
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")

end_to_end_tests/golden-record/my_test_api_client/api/tag1/get_tag_with_number.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from http import HTTPStatus
2-
from typing import Any, Dict, Optional
2+
from typing import Any, Dict, Optional, cast
33

44
import httpx
55

@@ -28,7 +28,7 @@ def _get_kwargs(
2828

2929
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
3030
if response.status_code == HTTPStatus.OK:
31-
response_200 = None
31+
response_200 = cast(Any, None)
3232
return response_200
3333
if client.raise_on_unexpected_status:
3434
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")

0 commit comments

Comments
 (0)