From 878ae1f3f7d6a34458d45cb6aea2a850da0999f3 Mon Sep 17 00:00:00 2001 From: Eli Bishop Date: Tue, 7 Jan 2025 10:40:16 -0800 Subject: [PATCH] merge from upstream main --- CHANGELOG.md | 66 ++ README.md | 10 + .../__snapshots__/test_end_to_end.ambr | 14 + end_to_end_tests/baseline_openapi_3.0.json | 4 +- end_to_end_tests/baseline_openapi_3.1.yaml | 4 +- end_to_end_tests/config.yml | 1 + .../my_test_api_client/api/__init__.py | 33 +- .../my_test_api_client/api/tag2/__init__.py | 11 + .../bad-status-code.yaml | 14 + .../generated_code_execution/test_arrays.py | 14 +- .../api/bodies/json_like.py | 8 +- .../api/bodies/post_bodies_multiple.py | 8 +- .../my_test_api_client/api/bodies/refs.py | 8 +- .../api/config/content_type_override.py | 8 +- .../api/default/get_common_parameters.py | 8 +- .../api/default/get_models_allof.py | 6 +- .../get_models_oneof_with_required_const.py | 6 +- .../api/default/post_common_parameters.py | 8 +- .../api/default/reserved_parameters.py | 8 +- .../defaults/defaults_tests_defaults_post.py | 26 +- .../enums/bool_enum_tests_bool_enum_post.py | 8 +- .../api/enums/int_enum_tests_int_enum_post.py | 8 +- .../api/location/get_location_header_types.py | 8 +- .../get_location_query_optionality.py | 8 +- .../api/naming/hyphen_in_path.py | 6 +- .../api/naming/mixed_case.py | 8 +- ...st_naming_property_conflict_with_import.py | 8 +- .../get_parameter_references_path_param.py | 10 +- ...lete_common_parameters_overriding_param.py | 8 +- .../get_common_parameters_overriding_param.py | 8 +- .../get_same_name_multiple_locations_param.py | 10 +- .../parameters/multiple_path_parameters.py | 6 +- ..._responses_unions_simple_before_complex.py | 6 +- .../api/responses/reference_response.py | 6 +- .../api/responses/text_response.py | 6 +- .../api/tag1/get_tag_with_number.py | 6 +- .../my_test_api_client/api/tag2/__init__.py | 0 .../api/tag2/get_tag_with_number.py | 77 +++ .../api/tests/callback_test.py | 8 +- .../api/tests/description_with_backslash.py | 6 +- .../api/tests/get_basic_list_of_booleans.py | 28 +- .../api/tests/get_basic_list_of_floats.py | 28 +- .../api/tests/get_basic_list_of_integers.py | 28 +- .../api/tests/get_basic_list_of_strings.py | 28 +- .../api/tests/get_user_list.py | 82 +-- .../tests/json_body_tests_json_body_post.py | 8 +- .../no_response_tests_no_response_get.py | 6 +- .../octet_stream_tests_octet_stream_get.py | 6 +- .../octet_stream_tests_octet_stream_post.py | 8 +- .../api/tests/post_form_data.py | 8 +- .../api/tests/post_form_data_inline.py | 8 +- .../api/tests/post_tests_json_body_string.py | 8 +- .../api/tests/test_inline_objects.py | 8 +- ..._with_cookie_auth_token_with_cookie_get.py | 6 +- ...d_content_tests_unsupported_content_get.py | 6 +- .../tests/upload_file_tests_upload_post.py | 8 +- ...upload_multiple_files_tests_upload_post.py | 26 +- .../my_test_api_client/api/true_/false_.py | 8 +- .../my_test_api_client/client.py | 22 +- .../my_test_api_client/models/a_form_data.py | 12 +- .../my_test_api_client/models/a_model.py | 28 +- ...roperties_reference_that_are_not_object.py | 116 ++-- .../all_of_has_properties_but_no_type.py | 26 +- .../models/all_of_sub_model.py | 26 +- ...h_a_circular_ref_in_items_object_a_item.py | 18 +- ...ems_object_additional_properties_a_item.py | 16 +- ...ems_object_additional_properties_b_item.py | 16 +- ...h_a_circular_ref_in_items_object_b_item.py | 18 +- ...items_object_additional_properties_item.py | 16 +- ...th_a_recursive_ref_in_items_object_item.py | 18 +- .../models/another_all_of_sub_model.py | 38 +- .../body_upload_file_tests_upload_post.py | 48 +- ...e_tests_upload_post_additional_property.py | 12 +- ..._tests_upload_post_some_nullable_object.py | 12 +- ...load_file_tests_upload_post_some_object.py | 12 +- ..._tests_upload_post_some_optional_object.py | 12 +- .../my_test_api_client/models/extended.py | 32 +- .../models/free_form_model.py | 12 +- .../models/get_models_allof_response_200.py | 18 +- ...with_required_const_response_200_type_0.py | 28 +- ...with_required_const_response_200_type_1.py | 28 +- .../models/http_validation_error.py | 14 +- .../my_test_api_client/models/import_.py | 12 +- .../models/json_like_body.py | 12 +- .../models/mixed_case_response_200.py | 12 +- .../models/model_from_all_of.py | 38 +- .../my_test_api_client/models/model_name.py | 12 +- .../models/model_reference_with_periods.py | 12 +- ...odel_with_additional_properties_inlined.py | 12 +- ..._properties_inlined_additional_property.py | 12 +- .../model_with_additional_properties_refed.py | 12 +- .../models/model_with_any_json_properties.py | 24 +- ...any_json_properties_additional_property.py | 12 +- .../model_with_backslash_in_description.py | 12 +- .../models/model_with_circular_ref_a.py | 14 +- .../models/model_with_circular_ref_b.py | 14 +- ...circular_ref_in_additional_properties_a.py | 12 +- ...circular_ref_in_additional_properties_b.py | 12 +- .../models/model_with_date_time_property.py | 12 +- .../models/model_with_merged_properties.py | 12 +- .../models/model_with_no_properties.py | 8 +- ...el_with_primitive_additional_properties.py | 14 +- ...ive_additional_properties_a_date_holder.py | 12 +- .../models/model_with_property_ref.py | 14 +- .../models/model_with_recursive_ref.py | 14 +- ..._recursive_ref_in_additional_properties.py | 12 +- .../models/model_with_union_property.py | 8 +- .../model_with_union_property_inlined.py | 10 +- ...ith_union_property_inlined_fruit_type_0.py | 12 +- ...ith_union_property_inlined_fruit_type_1.py | 12 +- .../my_test_api_client/models/none.py | 12 +- .../models/post_bodies_multiple_data_body.py | 12 +- .../models/post_bodies_multiple_files_body.py | 16 +- .../models/post_bodies_multiple_json_body.py | 12 +- .../models/post_form_data_inline_body.py | 12 +- ...ming_property_conflict_with_import_body.py | 12 +- ...perty_conflict_with_import_response_200.py | 12 +- ...ions_simple_before_complex_response_200.py | 14 +- ...ons_simple_before_complex_response_200a.py | 12 +- .../models/test_inline_objects_body.py | 8 +- .../test_inline_objects_response_200.py | 8 +- .../models/validation_error.py | 26 +- .../golden-record/my_test_api_client/types.py | 7 +- end_to_end_tests/golden-record/pyproject.toml | 6 +- .../enums/bool_enum_tests_bool_enum_post.py | 8 +- .../api/enums/int_enum_tests_int_enum_post.py | 8 +- .../api/tests/get_user_list.py | 84 +-- .../api/tests/post_user_list.py | 28 +- .../my_enum_api_client/client.py | 22 +- .../my_enum_api_client/models/a_model.py | 14 +- .../models/an_all_of_enum.py | 4 +- .../my_enum_api_client/models/an_enum.py | 4 +- .../models/an_enum_with_null.py | 4 +- .../my_enum_api_client/models/an_int_enum.py | 4 +- .../models/different_enum.py | 4 +- .../models/get_user_list_int_enum_header.py | 4 +- .../get_user_list_string_enum_header.py | 4 +- .../models/post_user_list_body.py | 54 +- .../my_enum_api_client/types.py | 7 +- .../pyproject.toml | 6 +- .../metadata_snapshots/pdm.pyproject.toml | 6 +- .../metadata_snapshots/poetry.pyproject.toml | 6 +- end_to_end_tests/metadata_snapshots/setup.py | 4 +- .../test-3-1-golden-record/pyproject.toml | 6 +- .../api/const/post_const_path.py | 10 +- .../api/prefix_items/post_prefix_items.py | 8 +- .../test_3_1_features_client/client.py | 22 +- .../models/post_const_path_body.py | 12 +- .../models/post_prefix_items_body.py | 24 +- .../test_3_1_features_client/types.py | 7 +- .../test_custom_templates/api_init.py.jinja | 3 +- end_to_end_tests/test_end_to_end.py | 14 +- integration-tests/.gitignore | 2 +- .../api/body/post_body_multipart.py | 8 +- .../api/parameters/post_parameters_header.py | 8 +- integration-tests/integration_tests/client.py | 22 +- .../models/post_body_multipart_body.py | 16 +- .../post_body_multipart_response_200.py | 12 +- .../post_parameters_header_response_200.py | 12 +- .../integration_tests/models/problem.py | 12 +- .../integration_tests/models/public_error.py | 42 +- integration-tests/integration_tests/py.typed | 1 + integration-tests/integration_tests/types.py | 7 +- integration-tests/pdm.lock | 169 ++--- integration-tests/pyproject.toml | 6 +- openapi_python_client/__init__.py | 23 +- openapi_python_client/cli.py | 7 +- openapi_python_client/config.py | 17 +- openapi_python_client/parser/bodies.py | 10 +- openapi_python_client/parser/errors.py | 2 +- openapi_python_client/parser/openapi.py | 99 +-- .../parser/properties/__init__.py | 4 +- .../parser/properties/enum_property.py | 4 +- .../parser/properties/list_property.py | 8 +- .../properties/literal_enum_property.py | 4 +- .../parser/properties/model_property.py | 5 +- .../parser/properties/protocol.py | 2 +- .../parser/properties/schemas.py | 30 +- openapi_python_client/parser/responses.py | 6 +- openapi_python_client/schema/__init__.py | 4 +- .../openapi_schema_pydantic/__init__.py | 15 +- .../openapi_schema_pydantic/callback.py | 4 +- .../openapi_schema_pydantic/components.py | 22 +- .../openapi_schema_pydantic/discriminator.py | 4 +- .../openapi_schema_pydantic/encoding.py | 8 +- .../schema/openapi_schema_pydantic/header.py | 9 +- .../schema/openapi_schema_pydantic/link.py | 4 +- .../openapi_schema_pydantic/media_type.py | 8 +- .../openapi_schema_pydantic/oauth_flow.py | 4 +- .../openapi_schema_pydantic/open_api.py | 20 +- .../openapi_schema_pydantic/operation.py | 22 +- .../openapi_schema_pydantic/parameter.py | 8 +- .../openapi_schema_pydantic/path_item.py | 17 +- .../schema/openapi_schema_pydantic/paths.py | 4 +- .../openapi_schema_pydantic/request_body.py | 6 +- .../openapi_schema_pydantic/response.py | 10 +- .../openapi_schema_pydantic/responses.py | 4 +- .../schema/openapi_schema_pydantic/schema.py | 21 +- .../security_requirement.py | 4 +- .../schema/openapi_schema_pydantic/server.py | 4 +- .../server_variable.py | 4 +- .../templates/client.py.jinja | 12 +- .../templates/endpoint_macros.py.jinja | 4 +- .../templates/endpoint_module.py.jinja | 6 +- .../templates/literal_enum.py.jinja | 4 +- .../templates/model.py.jinja | 19 +- .../property_templates/enum_property.py.jinja | 2 +- .../property_templates/list_property.py.jinja | 2 +- .../literal_enum_property.py.jinja | 2 +- .../templates/pyproject.toml.jinja | 12 +- .../templates/setup.py.jinja | 4 +- .../templates/types.py.jinja | 8 +- openapi_python_client/utils.py | 1 - poetry.lock | 595 ++++++++++-------- pyproject.toml | 2 +- tests/test_parser/test_openapi.py | 113 +--- .../test_properties/test_model_property.py | 9 +- tests/test_utils.py | 2 +- 218 files changed, 2011 insertions(+), 1836 deletions(-) create mode 100644 end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tag2/__init__.py create mode 100644 end_to_end_tests/documents_with_errors/bad-status-code.yaml create mode 100644 end_to_end_tests/golden-record/my_test_api_client/api/tag2/__init__.py create mode 100644 end_to_end_tests/golden-record/my_test_api_client/api/tag2/get_tag_with_number.py create mode 100644 integration-tests/integration_tests/py.typed diff --git a/CHANGELOG.md b/CHANGELOG.md index 037998c3e..6569f30fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,72 @@ Programmatic usage of this project (e.g., importing it as a Python module) and t The 0.x prefix used in versions for this project is to indicate that breaking changes are expected frequently (several times a year). Breaking changes will increment the minor number, all other changes will increment the patch number. You can track the progress toward 1.0 [here](https://github.com/openapi-generators/openapi-python-client/projects/2). +## 0.23.0 (2024-12-24) + +### Breaking Changes + +#### Delete fewer files with `--overwrite` + +`--overwrite` will no longer delete the entire output directory before regenerating. Instead, it will only delete +specific, known directories within that directory. Right now, that is only the generated `models` and `api` directories. + +Other generated files, like `README.md`, will be overwritten. Extra files and directories outside of those listed above +will be left untouched, so you can any extra modules or files around while still updating `pyproject.toml` automatically. + +Closes #1105. + +### Features + +- Support httpx 0.28 (#1172) + +#### Add `generate_all_tags` config option + +You can now, optionally, generate **duplicate** endpoint functions/modules using _every_ tag for an endpoint, +not just the first one, by setting `generate_all_tags: true` in your configuration file. + +### Fixes + +- Support Typer 0.14 and 0.15 (#1173) + +#### Fix minimum `attrs` version + +The minimum `attrs` dependency version was incorrectly set to 21.3.0. This has been corrected to 22.2.0, the minimum +supported version since `openapi-python-client` 0.19.1. + +Closes #1084, thanks @astralblue! + +#### Fix compatibility with Pydantic 2.10+ + +##1176 by @Viicos + +Set `defer_build` to models that we know will fail to build, and call `model_rebuild` +in the `__init__.py` file. + +## 0.22.0 (2024-11-23) + +### Breaking Changes + +#### Drop support for Python 3.8 + +Python 3.8 is no longer supported. "New" 3.9 syntax, like generics on builtin collections, is used both in the generator +and the generated code. + +#### `type` is now a reserved field name + +Because `type` is used in type annotations now, it is no longer a valid field name. Fields which were previously named +`type` will be renamed to `type_`. + +### Features + +- Support Ruff 0.8 (#1169) + +## 0.21.7 (2024-10-28) + +### Fixes + +- allow required fields list to be specified as empty (#651) (#1149) +- import cast for required const properties, since it's used in the template (#1153) + ## 0.21.6 (2024-10-20) ### Features diff --git a/README.md b/README.md index 5176daa63..f5964f3b1 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,16 @@ literal_enums: true This is especially useful if enum values, when transformed to their Python names, end up conflicting due to case sensitivity or special symbols. +### generate_all_tags + +`openapi-python-client` generates module names within the `api` module based on the OpenAPI `tags` of each endpoint. +By default, only the _first_ tag is generated. If you want to generate **duplicate** endpoint functions using _every_ tag +listed, you can enable this option: + +```yaml +generate_all_tags: true +``` + ### project_name_override and package_name_override Used to change the name of generated client library project/package. If the project name is changed but an override for the package name diff --git a/end_to_end_tests/__snapshots__/test_end_to_end.ambr b/end_to_end_tests/__snapshots__/test_end_to_end.ambr index c87445ffb..525f8baf2 100644 --- a/end_to_end_tests/__snapshots__/test_end_to_end.ambr +++ b/end_to_end_tests/__snapshots__/test_end_to_end.ambr @@ -1,4 +1,18 @@ # serializer version: 1 +# name: test_documents_with_errors[bad-status-code] + ''' + Generating /test-documents-with-errors + Warning(s) encountered while generating. Client was generated, but some pieces may be missing + + WARNING parsing GET / within default. + + Invalid response status code abcdef (not a valid HTTP status code), response will be omitted from generated client + + + If you believe this was a mistake or this tool is missing a feature you need, please open an issue at https://github.com/openapi-generators/openapi-python-client/issues/new/choose + + ''' +# --- # name: test_documents_with_errors[circular-body-ref] ''' Generating /test-documents-with-errors diff --git a/end_to_end_tests/baseline_openapi_3.0.json b/end_to_end_tests/baseline_openapi_3.0.json index 301864a8d..b38bcab41 100644 --- a/end_to_end_tests/baseline_openapi_3.0.json +++ b/end_to_end_tests/baseline_openapi_3.0.json @@ -1163,9 +1163,7 @@ }, "/tag_with_number": { "get": { - "tags": [ - "1" - ], + "tags": ["1", "2"], "responses": { "200": { "description": "Success" diff --git a/end_to_end_tests/baseline_openapi_3.1.yaml b/end_to_end_tests/baseline_openapi_3.1.yaml index 7f9b11bc6..8cb3e3510 100644 --- a/end_to_end_tests/baseline_openapi_3.1.yaml +++ b/end_to_end_tests/baseline_openapi_3.1.yaml @@ -1155,9 +1155,7 @@ info: }, "/tag_with_number": { "get": { - "tags": [ - "1" - ], + "tags": ["1", "2"], "responses": { "200": { "description": "Success" diff --git a/end_to_end_tests/config.yml b/end_to_end_tests/config.yml index 64e58439a..a813deddd 100644 --- a/end_to_end_tests/config.yml +++ b/end_to_end_tests/config.yml @@ -11,3 +11,4 @@ class_overrides: field_prefix: attr_ content_type_overrides: openapi/python/client: application/json +generate_all_tags: true diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/__init__.py index 79a699a1e..d1102fa1a 100644 --- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/__init__.py +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/__init__.py @@ -1,7 +1,5 @@ """Contains methods for accessing the API""" -from typing import Type - from .bodies import BodiesEndpoints from .config import ConfigEndpoints from .default import DefaultEndpoints @@ -13,59 +11,64 @@ from .parameters import ParametersEndpoints from .responses import ResponsesEndpoints from .tag1 import Tag1Endpoints +from .tag2 import Tag2Endpoints from .tests import TestsEndpoints from .true_ import True_Endpoints class MyTestApiClientApi: @classmethod - def bodies(cls) -> Type[BodiesEndpoints]: + def bodies(cls) -> type[BodiesEndpoints]: return BodiesEndpoints @classmethod - def tests(cls) -> Type[TestsEndpoints]: + def tests(cls) -> type[TestsEndpoints]: return TestsEndpoints @classmethod - def defaults(cls) -> Type[DefaultsEndpoints]: + def defaults(cls) -> type[DefaultsEndpoints]: return DefaultsEndpoints @classmethod - def enums(cls) -> Type[EnumsEndpoints]: + def enums(cls) -> type[EnumsEndpoints]: return EnumsEndpoints @classmethod - def responses(cls) -> Type[ResponsesEndpoints]: + def responses(cls) -> type[ResponsesEndpoints]: return ResponsesEndpoints @classmethod - def default(cls) -> Type[DefaultEndpoints]: + def default(cls) -> type[DefaultEndpoints]: return DefaultEndpoints @classmethod - def parameters(cls) -> Type[ParametersEndpoints]: + def parameters(cls) -> type[ParametersEndpoints]: return ParametersEndpoints @classmethod - def tag1(cls) -> Type[Tag1Endpoints]: + def tag1(cls) -> type[Tag1Endpoints]: return Tag1Endpoints @classmethod - def location(cls) -> Type[LocationEndpoints]: + def tag2(cls) -> type[Tag2Endpoints]: + return Tag2Endpoints + + @classmethod + def location(cls) -> type[LocationEndpoints]: return LocationEndpoints @classmethod - def true_(cls) -> Type[True_Endpoints]: + def true_(cls) -> type[True_Endpoints]: return True_Endpoints @classmethod - def naming(cls) -> Type[NamingEndpoints]: + def naming(cls) -> type[NamingEndpoints]: return NamingEndpoints @classmethod - def parameter_references(cls) -> Type[ParameterReferencesEndpoints]: + def parameter_references(cls) -> type[ParameterReferencesEndpoints]: return ParameterReferencesEndpoints @classmethod - def config(cls) -> Type[ConfigEndpoints]: + def config(cls) -> type[ConfigEndpoints]: return ConfigEndpoints diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tag2/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tag2/__init__.py new file mode 100644 index 000000000..65edddf25 --- /dev/null +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tag2/__init__.py @@ -0,0 +1,11 @@ +"""Contains methods for accessing the API Endpoints""" + +import types + +from . import get_tag_with_number + + +class Tag2Endpoints: + @classmethod + def get_tag_with_number(cls) -> types.ModuleType: + return get_tag_with_number diff --git a/end_to_end_tests/documents_with_errors/bad-status-code.yaml b/end_to_end_tests/documents_with_errors/bad-status-code.yaml new file mode 100644 index 000000000..17c3ab2cf --- /dev/null +++ b/end_to_end_tests/documents_with_errors/bad-status-code.yaml @@ -0,0 +1,14 @@ +openapi: "3.1.0" +info: + title: "There's something wrong with me" + version: "0.1.0" +paths: + "/": + get: + responses: + "abcdef": + description: "Successful Response" + content: + "application/json": + schema: + const: "Why have a fixed response? I dunno" diff --git a/end_to_end_tests/functional_tests/generated_code_execution/test_arrays.py b/end_to_end_tests/functional_tests/generated_code_execution/test_arrays.py index 9fe3d3042..5cf44e78e 100644 --- a/end_to_end_tests/functional_tests/generated_code_execution/test_arrays.py +++ b/end_to_end_tests/functional_tests/generated_code_execution/test_arrays.py @@ -1,4 +1,4 @@ -from typing import Any, ForwardRef, List, Union +from typing import Any, ForwardRef, Union from end_to_end_tests.functional_tests.helpers import ( assert_model_decode_encode, @@ -65,9 +65,9 @@ def test_array_of_object(self, ModelWithArrayOfObjects, SimpleObject): ) def test_type_hints(self, ModelWithArrayOfAny, ModelWithArrayOfInts, ModelWithArrayOfObjects, Unset): - assert_model_property_type_hint(ModelWithArrayOfAny, "array_prop", Union[List[Any], Unset]) - assert_model_property_type_hint(ModelWithArrayOfInts, "array_prop", Union[List[int], Unset]) - assert_model_property_type_hint(ModelWithArrayOfObjects, "array_prop", Union[List[ForwardRef("SimpleObject")], Unset]) + assert_model_property_type_hint(ModelWithArrayOfAny, "array_prop", Union[list[Any], Unset]) + assert_model_property_type_hint(ModelWithArrayOfInts, "array_prop", Union[list[int], Unset]) + assert_model_property_type_hint(ModelWithArrayOfObjects, "array_prop", Union[list["SimpleObject"], Unset]) # type: ignore @with_generated_client_fixture( @@ -133,16 +133,16 @@ def test_prefix_items_and_regular_items(self, ModelWithMixedItems, SimpleObject) ) def test_type_hints(self, ModelWithSinglePrefixItem, ModelWithPrefixItems, ModelWithMixedItems, Unset): - assert_model_property_type_hint(ModelWithSinglePrefixItem, "array_prop", Union[List[str], Unset]) + assert_model_property_type_hint(ModelWithSinglePrefixItem, "array_prop", Union[list[str], Unset]) assert_model_property_type_hint( ModelWithPrefixItems, "array_prop", - Union[List[Union[ForwardRef("SimpleObject"), str]], Unset], + Union[list[Union[ForwardRef("SimpleObject"), str]], Unset], ) assert_model_property_type_hint( ModelWithMixedItems, "array_prop", - Union[List[Union[ForwardRef("SimpleObject"), str]], Unset], + Union[list[Union[ForwardRef("SimpleObject"), str]], Unset], ) # Note, this test is asserting the current behavior which, due to limitations of the implementation # (see: https://github.com/openapi-generators/openapi-python-client/pull/1130), is not really doing diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/bodies/json_like.py b/end_to_end_tests/golden-record/my_test_api_client/api/bodies/json_like.py index 646279c98..626bacfa6 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/bodies/json_like.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/bodies/json_like.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -12,10 +12,10 @@ def _get_kwargs( *, body: JsonLikeBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/bodies/json-like", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py b/end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py index 136cd3b5b..84ec8eee0 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/bodies/post_bodies_multiple.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -19,10 +19,10 @@ def _get_kwargs( PostBodiesMultipleDataBody, PostBodiesMultipleFilesBody, ], -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/bodies/multiple", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/bodies/refs.py b/end_to_end_tests/golden-record/my_test_api_client/api/bodies/refs.py index 20eb25160..a79cf178a 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/bodies/refs.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/bodies/refs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -12,10 +12,10 @@ def _get_kwargs( *, body: AModel, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/bodies/refs", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/config/content_type_override.py b/end_to_end_tests/golden-record/my_test_api_client/api/config/content_type_override.py index 29d4ed7c3..2bd74aac4 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/config/content_type_override.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/config/content_type_override.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast +from typing import Any, Optional, Union, cast import httpx @@ -11,10 +11,10 @@ def _get_kwargs( *, body: str, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/config/content-type-override", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/default/get_common_parameters.py b/end_to_end_tests/golden-record/my_test_api_client/api/default/get_common_parameters.py index 7bf48a0f8..7de222f55 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/default/get_common_parameters.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/default/get_common_parameters.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -11,14 +11,14 @@ def _get_kwargs( *, common: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} params["common"] = common params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/common_parameters", "params": params, diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/default/get_models_allof.py b/end_to_end_tests/golden-record/my_test_api_client/api/default/get_models_allof.py index 1d2fa73a8..9d837acd6 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/default/get_models_allof.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/default/get_models_allof.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/models/allof", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/default/get_models_oneof_with_required_const.py b/end_to_end_tests/golden-record/my_test_api_client/api/default/get_models_oneof_with_required_const.py index 85be98c28..85f68fb7c 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/default/get_models_oneof_with_required_const.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/default/get_models_oneof_with_required_const.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -14,8 +14,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/models/oneof-with-required-const", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/default/post_common_parameters.py b/end_to_end_tests/golden-record/my_test_api_client/api/default/post_common_parameters.py index 8fc836ad3..5bd941c69 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/default/post_common_parameters.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/default/post_common_parameters.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -11,14 +11,14 @@ def _get_kwargs( *, common: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} params["common"] = common params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/common_parameters", "params": params, diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/default/reserved_parameters.py b/end_to_end_tests/golden-record/my_test_api_client/api/default/reserved_parameters.py index ec2f3fc3c..fe7adf04c 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/default/reserved_parameters.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/default/reserved_parameters.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -12,8 +12,8 @@ def _get_kwargs( *, client_query: str, url_query: str, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} params["client"] = client_query @@ -21,7 +21,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/naming/reserved-parameters", "params": params, diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/defaults/defaults_tests_defaults_post.py b/end_to_end_tests/golden-record/my_test_api_client/api/defaults/defaults_tests_defaults_post.py index 12ac54947..ffc9b535e 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/defaults/defaults_tests_defaults_post.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/defaults/defaults_tests_defaults_post.py @@ -1,6 +1,6 @@ import datetime from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any, Optional, Union import httpx from dateutil.parser import isoparse @@ -22,14 +22,14 @@ def _get_kwargs( float_with_int: float = 3.0, int_prop: int = 7, boolean_prop: bool = False, - list_prop: List[AnEnum], + list_prop: list[AnEnum], union_prop: Union[float, str] = "not a float", union_prop_with_ref: Union[AnEnum, Unset, float] = 0.6, enum_prop: AnEnum, model_prop: "ModelWithUnionProperty", required_model_prop: "ModelWithUnionProperty", -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} params["string_prop"] = string_prop @@ -77,7 +77,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/defaults", "params": params, @@ -123,7 +123,7 @@ def sync_detailed( float_with_int: float = 3.0, int_prop: int = 7, boolean_prop: bool = False, - list_prop: List[AnEnum], + list_prop: list[AnEnum], union_prop: Union[float, str] = "not a float", union_prop_with_ref: Union[AnEnum, Unset, float] = 0.6, enum_prop: AnEnum, @@ -140,7 +140,7 @@ def sync_detailed( float_with_int (float): Default: 3.0. int_prop (int): Default: 7. boolean_prop (bool): Default: False. - list_prop (List[AnEnum]): + list_prop (list[AnEnum]): union_prop (Union[float, str]): Default: 'not a float'. union_prop_with_ref (Union[AnEnum, Unset, float]): Default: 0.6. enum_prop (AnEnum): For testing Enums in all the ways they can be used @@ -188,7 +188,7 @@ def sync( float_with_int: float = 3.0, int_prop: int = 7, boolean_prop: bool = False, - list_prop: List[AnEnum], + list_prop: list[AnEnum], union_prop: Union[float, str] = "not a float", union_prop_with_ref: Union[AnEnum, Unset, float] = 0.6, enum_prop: AnEnum, @@ -205,7 +205,7 @@ def sync( float_with_int (float): Default: 3.0. int_prop (int): Default: 7. boolean_prop (bool): Default: False. - list_prop (List[AnEnum]): + list_prop (list[AnEnum]): union_prop (Union[float, str]): Default: 'not a float'. union_prop_with_ref (Union[AnEnum, Unset, float]): Default: 0.6. enum_prop (AnEnum): For testing Enums in all the ways they can be used @@ -248,7 +248,7 @@ async def asyncio_detailed( float_with_int: float = 3.0, int_prop: int = 7, boolean_prop: bool = False, - list_prop: List[AnEnum], + list_prop: list[AnEnum], union_prop: Union[float, str] = "not a float", union_prop_with_ref: Union[AnEnum, Unset, float] = 0.6, enum_prop: AnEnum, @@ -265,7 +265,7 @@ async def asyncio_detailed( float_with_int (float): Default: 3.0. int_prop (int): Default: 7. boolean_prop (bool): Default: False. - list_prop (List[AnEnum]): + list_prop (list[AnEnum]): union_prop (Union[float, str]): Default: 'not a float'. union_prop_with_ref (Union[AnEnum, Unset, float]): Default: 0.6. enum_prop (AnEnum): For testing Enums in all the ways they can be used @@ -311,7 +311,7 @@ async def asyncio( float_with_int: float = 3.0, int_prop: int = 7, boolean_prop: bool = False, - list_prop: List[AnEnum], + list_prop: list[AnEnum], union_prop: Union[float, str] = "not a float", union_prop_with_ref: Union[AnEnum, Unset, float] = 0.6, enum_prop: AnEnum, @@ -328,7 +328,7 @@ async def asyncio( float_with_int (float): Default: 3.0. int_prop (int): Default: 7. boolean_prop (bool): Default: False. - list_prop (List[AnEnum]): + list_prop (list[AnEnum]): union_prop (Union[float, str]): Default: 'not a float'. union_prop_with_ref (Union[AnEnum, Unset, float]): Default: 0.6. enum_prop (AnEnum): For testing Enums in all the ways they can be used diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/enums/bool_enum_tests_bool_enum_post.py b/end_to_end_tests/golden-record/my_test_api_client/api/enums/bool_enum_tests_bool_enum_post.py index 851cdf385..52385855c 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/enums/bool_enum_tests_bool_enum_post.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/enums/bool_enum_tests_bool_enum_post.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -11,14 +11,14 @@ def _get_kwargs( *, bool_enum: bool, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} params["bool_enum"] = bool_enum params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/enum/bool", "params": params, diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/enums/int_enum_tests_int_enum_post.py b/end_to_end_tests/golden-record/my_test_api_client/api/enums/int_enum_tests_int_enum_post.py index f7c403771..26c3729fe 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/enums/int_enum_tests_int_enum_post.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/enums/int_enum_tests_int_enum_post.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -12,15 +12,15 @@ def _get_kwargs( *, int_enum: AnIntEnum, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} json_int_enum = int_enum.value params["int_enum"] = json_int_enum params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/enum/int", "params": params, diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/location/get_location_header_types.py b/end_to_end_tests/golden-record/my_test_api_client/api/location/get_location_header_types.py index 140bb3780..ad9428a72 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/location/get_location_header_types.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/location/get_location_header_types.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -18,8 +18,8 @@ def _get_kwargs( integer_header: Union[Unset, int] = UNSET, int_enum_header: Union[Unset, GetLocationHeaderTypesIntEnumHeader] = UNSET, string_enum_header: Union[Unset, GetLocationHeaderTypesStringEnumHeader] = UNSET, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} if not isinstance(boolean_header, Unset): headers["Boolean-Header"] = "true" if boolean_header else "false" @@ -38,7 +38,7 @@ def _get_kwargs( if not isinstance(string_enum_header, Unset): headers["String-Enum-Header"] = str(string_enum_header) - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/location/header/types", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/location/get_location_query_optionality.py b/end_to_end_tests/golden-record/my_test_api_client/api/location/get_location_query_optionality.py index fcbc8213a..e28e37a36 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/location/get_location_query_optionality.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/location/get_location_query_optionality.py @@ -1,6 +1,6 @@ import datetime from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -15,8 +15,8 @@ def _get_kwargs( null_required: Union[None, datetime.datetime], null_not_required: Union[None, Unset, datetime.datetime] = UNSET, not_null_not_required: Union[Unset, datetime.datetime] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} json_not_null_required = not_null_required.isoformat() params["not_null_required"] = json_not_null_required @@ -44,7 +44,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/location/query/optionality", "params": params, diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/naming/hyphen_in_path.py b/end_to_end_tests/golden-record/my_test_api_client/api/naming/hyphen_in_path.py index a94062b1b..a0caba2d6 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/naming/hyphen_in_path.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/naming/hyphen_in_path.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -10,8 +10,8 @@ def _get_kwargs( hyphen_in_path: str, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/naming/{hyphen_in_path}", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/naming/mixed_case.py b/end_to_end_tests/golden-record/my_test_api_client/api/naming/mixed_case.py index ece16e492..7df2d318f 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/naming/mixed_case.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/naming/mixed_case.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -13,8 +13,8 @@ def _get_kwargs( *, mixed_case: str, mixedCase: str, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} params["mixed_case"] = mixed_case @@ -22,7 +22,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/naming/mixed-case", "params": params, diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/naming/post_naming_property_conflict_with_import.py b/end_to_end_tests/golden-record/my_test_api_client/api/naming/post_naming_property_conflict_with_import.py index 083bdd12d..3bb8b698b 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/naming/post_naming_property_conflict_with_import.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/naming/post_naming_property_conflict_with_import.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -15,10 +15,10 @@ def _get_kwargs( *, body: PostNamingPropertyConflictWithImportBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/naming/property-conflict-with-import", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/parameter_references/get_parameter_references_path_param.py b/end_to_end_tests/golden-record/my_test_api_client/api/parameter_references/get_parameter_references_path_param.py index 3d8c6ad36..e7a8e2712 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/parameter_references/get_parameter_references_path_param.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/parameter_references/get_parameter_references_path_param.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -15,8 +15,8 @@ def _get_kwargs( integer_param: Union[Unset, int] = 0, header_param: Union[None, Unset, str] = UNSET, cookie_param: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} if not isinstance(header_param, Unset): headers["header param"] = header_param @@ -24,7 +24,7 @@ def _get_kwargs( if cookie_param is not UNSET: cookies["cookie param"] = cookie_param - params: Dict[str, Any] = {} + params: dict[str, Any] = {} params["string param"] = string_param @@ -32,7 +32,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/parameter-references/{path_param}", "params": params, diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/parameters/delete_common_parameters_overriding_param.py b/end_to_end_tests/golden-record/my_test_api_client/api/parameters/delete_common_parameters_overriding_param.py index b842b8834..704996107 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/parameters/delete_common_parameters_overriding_param.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/parameters/delete_common_parameters_overriding_param.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -12,14 +12,14 @@ def _get_kwargs( param_path: str, *, param_query: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} params["param"] = param_query params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "delete", "url": f"/common_parameters_overriding/{param_path}", "params": params, diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/parameters/get_common_parameters_overriding_param.py b/end_to_end_tests/golden-record/my_test_api_client/api/parameters/get_common_parameters_overriding_param.py index 5dc4aa7ec..b6efbba9b 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/parameters/get_common_parameters_overriding_param.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/parameters/get_common_parameters_overriding_param.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -12,14 +12,14 @@ def _get_kwargs( param_path: str, *, param_query: str = "overridden_in_GET", -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} params["param"] = param_query params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/common_parameters_overriding/{param_path}", "params": params, diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/parameters/get_same_name_multiple_locations_param.py b/end_to_end_tests/golden-record/my_test_api_client/api/parameters/get_same_name_multiple_locations_param.py index 834875ff7..6a7ed7fd5 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/parameters/get_same_name_multiple_locations_param.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/parameters/get_same_name_multiple_locations_param.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -14,8 +14,8 @@ def _get_kwargs( param_query: Union[Unset, str] = UNSET, param_header: Union[Unset, str] = UNSET, param_cookie: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} if not isinstance(param_header, Unset): headers["param"] = param_header @@ -23,13 +23,13 @@ def _get_kwargs( if param_cookie is not UNSET: cookies["param"] = param_cookie - params: Dict[str, Any] = {} + params: dict[str, Any] = {} params["param"] = param_query params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": f"/same-name-multiple-locations/{param_path}", "params": params, diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/parameters/multiple_path_parameters.py b/end_to_end_tests/golden-record/my_test_api_client/api/parameters/multiple_path_parameters.py index 22f476963..44345aa26 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/parameters/multiple_path_parameters.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/parameters/multiple_path_parameters.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -13,8 +13,8 @@ def _get_kwargs( param2: int, param1: str, param3: int, -) -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": f"/multiple-path-parameters/{param4}/something/{param2}/{param1}/{param3}", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/responses/post_responses_unions_simple_before_complex.py b/end_to_end_tests/golden-record/my_test_api_client/api/responses/post_responses_unions_simple_before_complex.py index 97bc5922a..cf0599306 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/responses/post_responses_unions_simple_before_complex.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/responses/post_responses_unions_simple_before_complex.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -11,8 +11,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", "url": "/responses/unions/simple_before_complex", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/responses/reference_response.py b/end_to_end_tests/golden-record/my_test_api_client/api/responses/reference_response.py index 7ab4e3b55..ac71e9e50 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/responses/reference_response.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/responses/reference_response.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -9,8 +9,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/responses/reference", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/responses/text_response.py b/end_to_end_tests/golden-record/my_test_api_client/api/responses/text_response.py index cc4dd9531..057ceb2de 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/responses/text_response.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/responses/text_response.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -8,8 +8,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "post", "url": "/responses/text", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tag1/get_tag_with_number.py b/end_to_end_tests/golden-record/my_test_api_client/api/tag1/get_tag_with_number.py index c6756b522..62631355f 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tag1/get_tag_with_number.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tag1/get_tag_with_number.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -8,8 +8,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/tag_with_number", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tag2/__init__.py b/end_to_end_tests/golden-record/my_test_api_client/api/tag2/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tag2/get_tag_with_number.py b/end_to_end_tests/golden-record/my_test_api_client/api/tag2/get_tag_with_number.py new file mode 100644 index 000000000..62631355f --- /dev/null +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tag2/get_tag_with_number.py @@ -0,0 +1,77 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tag_with_number", + } + + return _kwargs + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if response.status_code == 200: + return None + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """ + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/callback_test.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/callback_test.py index 30ed5aa7f..0852815d2 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/callback_test.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/callback_test.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: AModel, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/tests/callback", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/description_with_backslash.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/description_with_backslash.py index 4cfc8e5a5..e7cd44f70 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/description_with_backslash.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/description_with_backslash.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -8,8 +8,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/tests/description-with-backslash", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_booleans.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_booleans.py index 53cb6598d..147eed3a7 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_booleans.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_booleans.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union, cast +from typing import Any, Optional, Union, cast import httpx @@ -8,8 +8,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/tests/basic_lists/booleans", } @@ -17,9 +17,9 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List[bool]]: +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[list[bool]]: if response.status_code == 200: - response_200 = cast(List[bool], response.json()) + response_200 = cast(list[bool], response.json()) return response_200 if client.raise_on_unexpected_status: @@ -28,7 +28,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt return None -def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List[bool]]: +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[list[bool]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -40,7 +40,7 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt def sync_detailed( *, client: Union[AuthenticatedClient, Client], -) -> Response[List[bool]]: +) -> Response[list[bool]]: """Get Basic List Of Booleans Get a list of booleans @@ -50,7 +50,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List[bool]] + Response[list[bool]] """ kwargs = _get_kwargs() @@ -65,7 +65,7 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], -) -> Optional[List[bool]]: +) -> Optional[list[bool]]: """Get Basic List Of Booleans Get a list of booleans @@ -75,7 +75,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List[bool] + list[bool] """ return sync_detailed( @@ -86,7 +86,7 @@ def sync( async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], -) -> Response[List[bool]]: +) -> Response[list[bool]]: """Get Basic List Of Booleans Get a list of booleans @@ -96,7 +96,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List[bool]] + Response[list[bool]] """ kwargs = _get_kwargs() @@ -109,7 +109,7 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], -) -> Optional[List[bool]]: +) -> Optional[list[bool]]: """Get Basic List Of Booleans Get a list of booleans @@ -119,7 +119,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List[bool] + list[bool] """ return ( diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_floats.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_floats.py index 7d1f71559..02b3abb1f 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_floats.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_floats.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union, cast +from typing import Any, Optional, Union, cast import httpx @@ -8,8 +8,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/tests/basic_lists/floats", } @@ -17,9 +17,9 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List[float]]: +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[list[float]]: if response.status_code == 200: - response_200 = cast(List[float], response.json()) + response_200 = cast(list[float], response.json()) return response_200 if client.raise_on_unexpected_status: @@ -28,7 +28,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt return None -def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List[float]]: +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[list[float]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -40,7 +40,7 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt def sync_detailed( *, client: Union[AuthenticatedClient, Client], -) -> Response[List[float]]: +) -> Response[list[float]]: """Get Basic List Of Floats Get a list of floats @@ -50,7 +50,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List[float]] + Response[list[float]] """ kwargs = _get_kwargs() @@ -65,7 +65,7 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], -) -> Optional[List[float]]: +) -> Optional[list[float]]: """Get Basic List Of Floats Get a list of floats @@ -75,7 +75,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List[float] + list[float] """ return sync_detailed( @@ -86,7 +86,7 @@ def sync( async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], -) -> Response[List[float]]: +) -> Response[list[float]]: """Get Basic List Of Floats Get a list of floats @@ -96,7 +96,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List[float]] + Response[list[float]] """ kwargs = _get_kwargs() @@ -109,7 +109,7 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], -) -> Optional[List[float]]: +) -> Optional[list[float]]: """Get Basic List Of Floats Get a list of floats @@ -119,7 +119,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List[float] + list[float] """ return ( diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_integers.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_integers.py index 14d978288..e71537363 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_integers.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_integers.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union, cast +from typing import Any, Optional, Union, cast import httpx @@ -8,8 +8,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/tests/basic_lists/integers", } @@ -17,9 +17,9 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List[int]]: +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[list[int]]: if response.status_code == 200: - response_200 = cast(List[int], response.json()) + response_200 = cast(list[int], response.json()) return response_200 if client.raise_on_unexpected_status: @@ -28,7 +28,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt return None -def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List[int]]: +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[list[int]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -40,7 +40,7 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt def sync_detailed( *, client: Union[AuthenticatedClient, Client], -) -> Response[List[int]]: +) -> Response[list[int]]: """Get Basic List Of Integers Get a list of integers @@ -50,7 +50,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List[int]] + Response[list[int]] """ kwargs = _get_kwargs() @@ -65,7 +65,7 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], -) -> Optional[List[int]]: +) -> Optional[list[int]]: """Get Basic List Of Integers Get a list of integers @@ -75,7 +75,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List[int] + list[int] """ return sync_detailed( @@ -86,7 +86,7 @@ def sync( async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], -) -> Response[List[int]]: +) -> Response[list[int]]: """Get Basic List Of Integers Get a list of integers @@ -96,7 +96,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List[int]] + Response[list[int]] """ kwargs = _get_kwargs() @@ -109,7 +109,7 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], -) -> Optional[List[int]]: +) -> Optional[list[int]]: """Get Basic List Of Integers Get a list of integers @@ -119,7 +119,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List[int] + list[int] """ return ( diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_strings.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_strings.py index 61b2bc3f5..70f153829 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_strings.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_strings.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union, cast +from typing import Any, Optional, Union, cast import httpx @@ -8,8 +8,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/tests/basic_lists/strings", } @@ -17,9 +17,9 @@ def _get_kwargs() -> Dict[str, Any]: return _kwargs -def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List[str]]: +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[list[str]]: if response.status_code == 200: - response_200 = cast(List[str], response.json()) + response_200 = cast(list[str], response.json()) return response_200 if client.raise_on_unexpected_status: @@ -28,7 +28,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt return None -def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List[str]]: +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[list[str]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -40,7 +40,7 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt def sync_detailed( *, client: Union[AuthenticatedClient, Client], -) -> Response[List[str]]: +) -> Response[list[str]]: """Get Basic List Of Strings Get a list of strings @@ -50,7 +50,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List[str]] + Response[list[str]] """ kwargs = _get_kwargs() @@ -65,7 +65,7 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], -) -> Optional[List[str]]: +) -> Optional[list[str]]: """Get Basic List Of Strings Get a list of strings @@ -75,7 +75,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List[str] + list[str] """ return sync_detailed( @@ -86,7 +86,7 @@ def sync( async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], -) -> Response[List[str]]: +) -> Response[list[str]]: """Get Basic List Of Strings Get a list of strings @@ -96,7 +96,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List[str]] + Response[list[str]] """ kwargs = _get_kwargs() @@ -109,7 +109,7 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], -) -> Optional[List[str]]: +) -> Optional[list[str]]: """Get Basic List Of Strings Get a list of strings @@ -119,7 +119,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List[str] + list[str] """ return ( diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_user_list.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_user_list.py index 444657982..a708cf71d 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_user_list.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/get_user_list.py @@ -1,6 +1,6 @@ import datetime from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any, Optional, Union import httpx @@ -15,12 +15,12 @@ def _get_kwargs( *, - an_enum_value: List[AnEnum], - an_enum_value_with_null: List[Union[AnEnumWithNull, None]], - an_enum_value_with_only_null: List[None], + an_enum_value: list[AnEnum], + an_enum_value_with_null: list[Union[AnEnumWithNull, None]], + an_enum_value_with_only_null: list[None], some_date: Union[datetime.date, datetime.datetime], -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} json_an_enum_value = [] for an_enum_value_item_data in an_enum_value: @@ -54,7 +54,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/tests/", "params": params, @@ -65,7 +65,7 @@ def _get_kwargs( def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[HTTPValidationError, List["AModel"]]]: +) -> Optional[Union[HTTPValidationError, list["AModel"]]]: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -91,7 +91,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[HTTPValidationError, List["AModel"]]]: +) -> Response[Union[HTTPValidationError, list["AModel"]]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -103,19 +103,19 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - an_enum_value: List[AnEnum], - an_enum_value_with_null: List[Union[AnEnumWithNull, None]], - an_enum_value_with_only_null: List[None], + an_enum_value: list[AnEnum], + an_enum_value_with_null: list[Union[AnEnumWithNull, None]], + an_enum_value_with_only_null: list[None], some_date: Union[datetime.date, datetime.datetime], -) -> Response[Union[HTTPValidationError, List["AModel"]]]: +) -> Response[Union[HTTPValidationError, list["AModel"]]]: """Get List Get a list of things Args: - an_enum_value (List[AnEnum]): - an_enum_value_with_null (List[Union[AnEnumWithNull, None]]): - an_enum_value_with_only_null (List[None]): + an_enum_value (list[AnEnum]): + an_enum_value_with_null (list[Union[AnEnumWithNull, None]]): + an_enum_value_with_only_null (list[None]): some_date (Union[datetime.date, datetime.datetime]): Raises: @@ -123,7 +123,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, List['AModel']]] + Response[Union[HTTPValidationError, list['AModel']]] """ kwargs = _get_kwargs( @@ -143,19 +143,19 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - an_enum_value: List[AnEnum], - an_enum_value_with_null: List[Union[AnEnumWithNull, None]], - an_enum_value_with_only_null: List[None], + an_enum_value: list[AnEnum], + an_enum_value_with_null: list[Union[AnEnumWithNull, None]], + an_enum_value_with_only_null: list[None], some_date: Union[datetime.date, datetime.datetime], -) -> Optional[Union[HTTPValidationError, List["AModel"]]]: +) -> Optional[Union[HTTPValidationError, list["AModel"]]]: """Get List Get a list of things Args: - an_enum_value (List[AnEnum]): - an_enum_value_with_null (List[Union[AnEnumWithNull, None]]): - an_enum_value_with_only_null (List[None]): + an_enum_value (list[AnEnum]): + an_enum_value_with_null (list[Union[AnEnumWithNull, None]]): + an_enum_value_with_only_null (list[None]): some_date (Union[datetime.date, datetime.datetime]): Raises: @@ -163,7 +163,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, List['AModel']] + Union[HTTPValidationError, list['AModel']] """ return sync_detailed( @@ -178,19 +178,19 @@ def sync( async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - an_enum_value: List[AnEnum], - an_enum_value_with_null: List[Union[AnEnumWithNull, None]], - an_enum_value_with_only_null: List[None], + an_enum_value: list[AnEnum], + an_enum_value_with_null: list[Union[AnEnumWithNull, None]], + an_enum_value_with_only_null: list[None], some_date: Union[datetime.date, datetime.datetime], -) -> Response[Union[HTTPValidationError, List["AModel"]]]: +) -> Response[Union[HTTPValidationError, list["AModel"]]]: """Get List Get a list of things Args: - an_enum_value (List[AnEnum]): - an_enum_value_with_null (List[Union[AnEnumWithNull, None]]): - an_enum_value_with_only_null (List[None]): + an_enum_value (list[AnEnum]): + an_enum_value_with_null (list[Union[AnEnumWithNull, None]]): + an_enum_value_with_only_null (list[None]): some_date (Union[datetime.date, datetime.datetime]): Raises: @@ -198,7 +198,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[HTTPValidationError, List['AModel']]] + Response[Union[HTTPValidationError, list['AModel']]] """ kwargs = _get_kwargs( @@ -216,19 +216,19 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - an_enum_value: List[AnEnum], - an_enum_value_with_null: List[Union[AnEnumWithNull, None]], - an_enum_value_with_only_null: List[None], + an_enum_value: list[AnEnum], + an_enum_value_with_null: list[Union[AnEnumWithNull, None]], + an_enum_value_with_only_null: list[None], some_date: Union[datetime.date, datetime.datetime], -) -> Optional[Union[HTTPValidationError, List["AModel"]]]: +) -> Optional[Union[HTTPValidationError, list["AModel"]]]: """Get List Get a list of things Args: - an_enum_value (List[AnEnum]): - an_enum_value_with_null (List[Union[AnEnumWithNull, None]]): - an_enum_value_with_only_null (List[None]): + an_enum_value (list[AnEnum]): + an_enum_value_with_null (list[Union[AnEnumWithNull, None]]): + an_enum_value_with_only_null (list[None]): some_date (Union[datetime.date, datetime.datetime]): Raises: @@ -236,7 +236,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[HTTPValidationError, List['AModel']] + Union[HTTPValidationError, list['AModel']] """ return ( diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/json_body_tests_json_body_post.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/json_body_tests_json_body_post.py index b9b17aeac..f33a23dc7 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/json_body_tests_json_body_post.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/json_body_tests_json_body_post.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: AModel, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/tests/json_body", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/no_response_tests_no_response_get.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/no_response_tests_no_response_get.py index f78e06eed..586947f49 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/no_response_tests_no_response_get.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/no_response_tests_no_response_get.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -8,8 +8,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/tests/no_response", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_get.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_get.py index 4810d5ebc..efb0f4ae5 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_get.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_get.py @@ -1,6 +1,6 @@ from http import HTTPStatus from io import BytesIO -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -9,8 +9,8 @@ from ...types import File, Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/tests/octet_stream", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_post.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_post.py index c7faeb15f..ea0cbd65a 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_post.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_post.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast +from typing import Any, Optional, Union, cast import httpx @@ -12,10 +12,10 @@ def _get_kwargs( *, body: File, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/tests/octet_stream", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data.py index a2e7232c2..ec65d0363 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -12,10 +12,10 @@ def _get_kwargs( *, body: AFormData, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/tests/post_form_data", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data_inline.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data_inline.py index 290e6efdb..bc5ad7cc4 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data_inline.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data_inline.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -12,10 +12,10 @@ def _get_kwargs( *, body: PostFormDataInlineBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/tests/post_form_data_inline", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_tests_json_body_string.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_tests_json_body_string.py index bc80281c9..ba40de26f 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_tests_json_body_string.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/post_tests_json_body_string.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast +from typing import Any, Optional, Union, cast import httpx @@ -12,10 +12,10 @@ def _get_kwargs( *, body: str, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/tests/json_body/string", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/test_inline_objects.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/test_inline_objects.py index 07c16c748..287ea4a1a 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/test_inline_objects.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/test_inline_objects.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: TestInlineObjectsBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/tests/inline_objects", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/token_with_cookie_auth_token_with_cookie_get.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/token_with_cookie_auth_token_with_cookie_get.py index e71ee24e9..22ac00650 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/token_with_cookie_auth_token_with_cookie_get.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/token_with_cookie_auth_token_with_cookie_get.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -11,11 +11,11 @@ def _get_kwargs( *, my_token: str, -) -> Dict[str, Any]: +) -> dict[str, Any]: cookies = {} cookies["MyToken"] = my_token - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/auth/token_with_cookie", "cookies": cookies, diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/unsupported_content_tests_unsupported_content_get.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/unsupported_content_tests_unsupported_content_get.py index e22ed5125..61e8434e6 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/unsupported_content_tests_unsupported_content_get.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/unsupported_content_tests_unsupported_content_get.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -8,8 +8,8 @@ from ...types import Response -def _get_kwargs() -> Dict[str, Any]: - _kwargs: Dict[str, Any] = { +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { "method": "get", "url": "/tests/unsupported_content", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/upload_file_tests_upload_post.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/upload_file_tests_upload_post.py index 88b305101..9f1864ec3 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/upload_file_tests_upload_post.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/upload_file_tests_upload_post.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: BodyUploadFileTestsUploadPost, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/tests/upload", } diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/tests/upload_multiple_files_tests_upload_post.py b/end_to_end_tests/golden-record/my_test_api_client/api/tests/upload_multiple_files_tests_upload_post.py index 098ae7a13..3f8edc817 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/tests/upload_multiple_files_tests_upload_post.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/tests/upload_multiple_files_tests_upload_post.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any, Optional, Union import httpx @@ -11,11 +11,11 @@ def _get_kwargs( *, - body: List[File], -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} + body: list[File], +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/tests/upload/multiple", } @@ -62,14 +62,14 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - body: List[File], + body: list[File], ) -> Response[Union[Any, HTTPValidationError]]: """Upload multiple files Upload several files in the same request Args: - body (List[File]): + body (list[File]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -93,14 +93,14 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - body: List[File], + body: list[File], ) -> Optional[Union[Any, HTTPValidationError]]: """Upload multiple files Upload several files in the same request Args: - body (List[File]): + body (list[File]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -119,14 +119,14 @@ def sync( async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - body: List[File], + body: list[File], ) -> Response[Union[Any, HTTPValidationError]]: """Upload multiple files Upload several files in the same request Args: - body (List[File]): + body (list[File]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -148,14 +148,14 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - body: List[File], + body: list[File], ) -> Optional[Union[Any, HTTPValidationError]]: """Upload multiple files Upload several files in the same request Args: - body (List[File]): + body (list[File]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/true_/false_.py b/end_to_end_tests/golden-record/my_test_api_client/api/true_/false_.py index 891485f62..b46550153 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/true_/false_.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/true_/false_.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -11,14 +11,14 @@ def _get_kwargs( *, import_: str, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} params["import"] = import_ params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/naming/keywords", "params": params, diff --git a/end_to_end_tests/golden-record/my_test_api_client/client.py b/end_to_end_tests/golden-record/my_test_api_client/client.py index 0f6d15e84..e80446f10 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/client.py +++ b/end_to_end_tests/golden-record/my_test_api_client/client.py @@ -1,5 +1,5 @@ import ssl -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx from attrs import define, evolve, field @@ -36,16 +36,16 @@ class Client: raise_on_unexpected_status: bool = field(default=False, kw_only=True) _base_url: str = field(alias="base_url") - _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") _client: Optional[httpx.Client] = field(default=None, init=False) _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) - def with_headers(self, headers: Dict[str, str]) -> "Client": + def with_headers(self, headers: dict[str, str]) -> "Client": """Get a new client matching this one with additional headers""" if self._client is not None: self._client.headers.update(headers) @@ -53,7 +53,7 @@ def with_headers(self, headers: Dict[str, str]) -> "Client": self._async_client.headers.update(headers) return evolve(self, headers={**self._headers, **headers}) - def with_cookies(self, cookies: Dict[str, str]) -> "Client": + def with_cookies(self, cookies: dict[str, str]) -> "Client": """Get a new client matching this one with additional cookies""" if self._client is not None: self._client.cookies.update(cookies) @@ -166,12 +166,12 @@ class AuthenticatedClient: raise_on_unexpected_status: bool = field(default=False, kw_only=True) _base_url: str = field(alias="base_url") - _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") _client: Optional[httpx.Client] = field(default=None, init=False) _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) @@ -179,7 +179,7 @@ class AuthenticatedClient: prefix: str = "Bearer" auth_header_name: str = "Authorization" - def with_headers(self, headers: Dict[str, str]) -> "AuthenticatedClient": + def with_headers(self, headers: dict[str, str]) -> "AuthenticatedClient": """Get a new client matching this one with additional headers""" if self._client is not None: self._client.headers.update(headers) @@ -187,7 +187,7 @@ def with_headers(self, headers: Dict[str, str]) -> "AuthenticatedClient": self._async_client.headers.update(headers) return evolve(self, headers={**self._headers, **headers}) - def with_cookies(self, cookies: Dict[str, str]) -> "AuthenticatedClient": + def with_cookies(self, cookies: dict[str, str]) -> "AuthenticatedClient": """Get a new client matching this one with additional cookies""" if self._client is not None: self._client.cookies.update(cookies) diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/a_form_data.py b/end_to_end_tests/golden-record/my_test_api_client/models/a_form_data.py index a4c5cd8a7..12c57c3bc 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/a_form_data.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/a_form_data.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +18,14 @@ class AFormData: an_required_field: str an_optional_field: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: an_required_field = self.an_required_field an_optional_field = self.an_optional_field - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -38,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() an_required_field = d.pop("an_required_field") @@ -53,7 +53,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return a_form_data @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/a_model.py b/end_to_end_tests/golden-record/my_test_api_client/models/a_model.py index 774642622..07b3eed76 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/a_model.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/a_model.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from uuid import UUID from attrs import define as _attrs_define @@ -38,7 +38,7 @@ class AModel: nullable_model (Union['ModelWithUnionProperty', None]): any_value (Union[Unset, Any]): Default: 'default'. an_optional_allof_enum (Union[Unset, AnAllOfEnum]): - nested_list_of_enums (Union[Unset, List[List[DifferentEnum]]]): + nested_list_of_enums (Union[Unset, list[list[DifferentEnum]]]): a_not_required_date (Union[Unset, datetime.date]): a_not_required_uuid (Union[Unset, UUID]): attr_1_leading_digit (Union[Unset, str]): @@ -66,7 +66,7 @@ class AModel: a_nullable_uuid: Union[None, UUID] = UUID("07EF8B4D-AA09-4FFA-898D-C710796AFF41") any_value: Union[Unset, Any] = "default" an_optional_allof_enum: Union[Unset, AnAllOfEnum] = UNSET - nested_list_of_enums: Union[Unset, List[List[DifferentEnum]]] = UNSET + nested_list_of_enums: Union[Unset, list[list[DifferentEnum]]] = UNSET a_not_required_date: Union[Unset, datetime.date] = UNSET a_not_required_uuid: Union[Unset, UUID] = UNSET attr_1_leading_digit: Union[Unset, str] = UNSET @@ -78,7 +78,7 @@ class AModel: not_required_model: Union[Unset, "ModelWithUnionProperty"] = UNSET not_required_nullable_model: Union["ModelWithUnionProperty", None, Unset] = UNSET - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.free_form_model import FreeFormModel from ..models.model_with_union_property import ModelWithUnionProperty @@ -113,7 +113,7 @@ def to_dict(self) -> Dict[str, Any]: required_not_nullable = self.required_not_nullable - one_of_models: Union[Any, Dict[str, Any]] + one_of_models: Union[Any, dict[str, Any]] if isinstance(self.one_of_models, FreeFormModel): one_of_models = self.one_of_models.to_dict() elif isinstance(self.one_of_models, ModelWithUnionProperty): @@ -121,7 +121,7 @@ def to_dict(self) -> Dict[str, Any]: else: one_of_models = self.one_of_models - nullable_one_of_models: Union[Dict[str, Any], None] + nullable_one_of_models: Union[None, dict[str, Any]] if isinstance(self.nullable_one_of_models, FreeFormModel): nullable_one_of_models = self.nullable_one_of_models.to_dict() elif isinstance(self.nullable_one_of_models, ModelWithUnionProperty): @@ -131,7 +131,7 @@ def to_dict(self) -> Dict[str, Any]: model = self.model.to_dict() - nullable_model: Union[Dict[str, Any], None] + nullable_model: Union[None, dict[str, Any]] if isinstance(self.nullable_model, ModelWithUnionProperty): nullable_model = self.nullable_model.to_dict() else: @@ -143,7 +143,7 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.an_optional_allof_enum, Unset): an_optional_allof_enum = self.an_optional_allof_enum.value - nested_list_of_enums: Union[Unset, List[List[str]]] = UNSET + nested_list_of_enums: Union[Unset, list[list[str]]] = UNSET if not isinstance(self.nested_list_of_enums, Unset): nested_list_of_enums = [] for nested_list_of_enums_item_data in self.nested_list_of_enums: @@ -174,7 +174,7 @@ def to_dict(self) -> Dict[str, Any]: not_required_not_nullable = self.not_required_not_nullable - not_required_one_of_models: Union[Dict[str, Any], Unset] + not_required_one_of_models: Union[Unset, dict[str, Any]] if isinstance(self.not_required_one_of_models, Unset): not_required_one_of_models = UNSET elif isinstance(self.not_required_one_of_models, FreeFormModel): @@ -182,7 +182,7 @@ def to_dict(self) -> Dict[str, Any]: else: not_required_one_of_models = self.not_required_one_of_models.to_dict() - not_required_nullable_one_of_models: Union[Dict[str, Any], None, Unset, str] + not_required_nullable_one_of_models: Union[None, Unset, dict[str, Any], str] if isinstance(self.not_required_nullable_one_of_models, Unset): not_required_nullable_one_of_models = UNSET elif isinstance(self.not_required_nullable_one_of_models, FreeFormModel): @@ -192,11 +192,11 @@ def to_dict(self) -> Dict[str, Any]: else: not_required_nullable_one_of_models = self.not_required_nullable_one_of_models - not_required_model: Union[Unset, Dict[str, Any]] = UNSET + not_required_model: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.not_required_model, Unset): not_required_model = self.not_required_model.to_dict() - not_required_nullable_model: Union[Dict[str, Any], None, Unset] + not_required_nullable_model: Union[None, Unset, dict[str, Any]] if isinstance(self.not_required_nullable_model, Unset): not_required_nullable_model = UNSET elif isinstance(self.not_required_nullable_model, ModelWithUnionProperty): @@ -204,7 +204,7 @@ def to_dict(self) -> Dict[str, Any]: else: not_required_nullable_model = self.not_required_nullable_model - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update( { "an_enum_value": an_enum_value, @@ -252,7 +252,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.free_form_model import FreeFormModel from ..models.model_with_union_property import ModelWithUnionProperty diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/a_model_with_properties_reference_that_are_not_object.py b/end_to_end_tests/golden-record/my_test_api_client/models/a_model_with_properties_reference_that_are_not_object.py index 88ffd349f..c1a905195 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/a_model_with_properties_reference_that_are_not_object.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/a_model_with_properties_reference_that_are_not_object.py @@ -1,6 +1,6 @@ import datetime from io import BytesIO -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,26 +16,26 @@ class AModelWithPropertiesReferenceThatAreNotObject: """ Attributes: - enum_properties_ref (List[AnEnum]): - str_properties_ref (List[str]): - date_properties_ref (List[datetime.date]): - datetime_properties_ref (List[datetime.datetime]): - int32_properties_ref (List[int]): - int64_properties_ref (List[int]): - float_properties_ref (List[float]): - double_properties_ref (List[float]): - file_properties_ref (List[File]): - bytestream_properties_ref (List[str]): - enum_properties (List[AnEnum]): - str_properties (List[str]): - date_properties (List[datetime.date]): - datetime_properties (List[datetime.datetime]): - int32_properties (List[int]): - int64_properties (List[int]): - float_properties (List[float]): - double_properties (List[float]): - file_properties (List[File]): - bytestream_properties (List[str]): + enum_properties_ref (list[AnEnum]): + str_properties_ref (list[str]): + date_properties_ref (list[datetime.date]): + datetime_properties_ref (list[datetime.datetime]): + int32_properties_ref (list[int]): + int64_properties_ref (list[int]): + float_properties_ref (list[float]): + double_properties_ref (list[float]): + file_properties_ref (list[File]): + bytestream_properties_ref (list[str]): + enum_properties (list[AnEnum]): + str_properties (list[str]): + date_properties (list[datetime.date]): + datetime_properties (list[datetime.datetime]): + int32_properties (list[int]): + int64_properties (list[int]): + float_properties (list[float]): + double_properties (list[float]): + file_properties (list[File]): + bytestream_properties (list[str]): enum_property_ref (AnEnum): For testing Enums in all the ways they can be used str_property_ref (str): date_property_ref (datetime.date): @@ -48,26 +48,26 @@ class AModelWithPropertiesReferenceThatAreNotObject: bytestream_property_ref (str): """ - enum_properties_ref: List[AnEnum] - str_properties_ref: List[str] - date_properties_ref: List[datetime.date] - datetime_properties_ref: List[datetime.datetime] - int32_properties_ref: List[int] - int64_properties_ref: List[int] - float_properties_ref: List[float] - double_properties_ref: List[float] - file_properties_ref: List[File] - bytestream_properties_ref: List[str] - enum_properties: List[AnEnum] - str_properties: List[str] - date_properties: List[datetime.date] - datetime_properties: List[datetime.datetime] - int32_properties: List[int] - int64_properties: List[int] - float_properties: List[float] - double_properties: List[float] - file_properties: List[File] - bytestream_properties: List[str] + enum_properties_ref: list[AnEnum] + str_properties_ref: list[str] + date_properties_ref: list[datetime.date] + datetime_properties_ref: list[datetime.datetime] + int32_properties_ref: list[int] + int64_properties_ref: list[int] + float_properties_ref: list[float] + double_properties_ref: list[float] + file_properties_ref: list[File] + bytestream_properties_ref: list[str] + enum_properties: list[AnEnum] + str_properties: list[str] + date_properties: list[datetime.date] + datetime_properties: list[datetime.datetime] + int32_properties: list[int] + int64_properties: list[int] + float_properties: list[float] + double_properties: list[float] + file_properties: list[File] + bytestream_properties: list[str] enum_property_ref: AnEnum str_property_ref: str date_property_ref: datetime.date @@ -78,9 +78,9 @@ class AModelWithPropertiesReferenceThatAreNotObject: double_property_ref: float file_property_ref: File bytestream_property_ref: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: enum_properties_ref = [] for componentsschemas_an_other_array_of_enum_item_data in self.enum_properties_ref: componentsschemas_an_other_array_of_enum_item = componentsschemas_an_other_array_of_enum_item_data.value @@ -173,7 +173,7 @@ def to_dict(self) -> Dict[str, Any]: bytestream_property_ref = self.bytestream_property_ref - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -213,7 +213,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() enum_properties_ref = [] _enum_properties_ref = d.pop("enum_properties_ref") @@ -222,7 +222,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: enum_properties_ref.append(componentsschemas_an_other_array_of_enum_item) - str_properties_ref = cast(List[str], d.pop("str_properties_ref")) + str_properties_ref = cast(list[str], d.pop("str_properties_ref")) date_properties_ref = [] _date_properties_ref = d.pop("date_properties_ref") @@ -242,13 +242,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: datetime_properties_ref.append(componentsschemas_an_other_array_of_date_time_item) - int32_properties_ref = cast(List[int], d.pop("int32_properties_ref")) + int32_properties_ref = cast(list[int], d.pop("int32_properties_ref")) - int64_properties_ref = cast(List[int], d.pop("int64_properties_ref")) + int64_properties_ref = cast(list[int], d.pop("int64_properties_ref")) - float_properties_ref = cast(List[float], d.pop("float_properties_ref")) + float_properties_ref = cast(list[float], d.pop("float_properties_ref")) - double_properties_ref = cast(List[float], d.pop("double_properties_ref")) + double_properties_ref = cast(list[float], d.pop("double_properties_ref")) file_properties_ref = [] _file_properties_ref = d.pop("file_properties_ref") @@ -259,7 +259,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: file_properties_ref.append(componentsschemas_an_other_array_of_file_item) - bytestream_properties_ref = cast(List[str], d.pop("bytestream_properties_ref")) + bytestream_properties_ref = cast(list[str], d.pop("bytestream_properties_ref")) enum_properties = [] _enum_properties = d.pop("enum_properties") @@ -268,7 +268,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: enum_properties.append(componentsschemas_an_array_of_enum_item) - str_properties = cast(List[str], d.pop("str_properties")) + str_properties = cast(list[str], d.pop("str_properties")) date_properties = [] _date_properties = d.pop("date_properties") @@ -284,13 +284,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: datetime_properties.append(componentsschemas_an_array_of_date_time_item) - int32_properties = cast(List[int], d.pop("int32_properties")) + int32_properties = cast(list[int], d.pop("int32_properties")) - int64_properties = cast(List[int], d.pop("int64_properties")) + int64_properties = cast(list[int], d.pop("int64_properties")) - float_properties = cast(List[float], d.pop("float_properties")) + float_properties = cast(list[float], d.pop("float_properties")) - double_properties = cast(List[float], d.pop("double_properties")) + double_properties = cast(list[float], d.pop("double_properties")) file_properties = [] _file_properties = d.pop("file_properties") @@ -301,7 +301,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: file_properties.append(componentsschemas_an_array_of_file_item) - bytestream_properties = cast(List[str], d.pop("bytestream_properties")) + bytestream_properties = cast(list[str], d.pop("bytestream_properties")) enum_property_ref = AnEnum(d.pop("enum_property_ref")) @@ -360,7 +360,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return a_model_with_properties_reference_that_are_not_object @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/all_of_has_properties_but_no_type.py b/end_to_end_tests/golden-record/my_test_api_client/models/all_of_has_properties_but_no_type.py index 245a1b04a..6a39f4951 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/all_of_has_properties_but_no_type.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/all_of_has_properties_but_no_type.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,42 +14,42 @@ class AllOfHasPropertiesButNoType: """ Attributes: a_sub_property (Union[Unset, str]): - type (Union[Unset, str]): + type_ (Union[Unset, str]): type_enum (Union[Unset, AllOfHasPropertiesButNoTypeTypeEnum]): """ a_sub_property: Union[Unset, str] = UNSET - type: Union[Unset, str] = UNSET + type_: Union[Unset, str] = UNSET type_enum: Union[Unset, AllOfHasPropertiesButNoTypeTypeEnum] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a_sub_property = self.a_sub_property - type = self.type + type_ = self.type_ type_enum: Union[Unset, int] = UNSET if not isinstance(self.type_enum, Unset): type_enum = self.type_enum.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if a_sub_property is not UNSET: field_dict["a_sub_property"] = a_sub_property - if type is not UNSET: - field_dict["type"] = type + if type_ is not UNSET: + field_dict["type"] = type_ if type_enum is not UNSET: field_dict["type_enum"] = type_enum return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() a_sub_property = d.pop("a_sub_property", UNSET) - type = d.pop("type", UNSET) + type_ = d.pop("type", UNSET) _type_enum = d.pop("type_enum", UNSET) type_enum: Union[Unset, AllOfHasPropertiesButNoTypeTypeEnum] @@ -60,7 +60,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: all_of_has_properties_but_no_type = cls( a_sub_property=a_sub_property, - type=type, + type_=type_, type_enum=type_enum, ) @@ -68,7 +68,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return all_of_has_properties_but_no_type @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/all_of_sub_model.py b/end_to_end_tests/golden-record/my_test_api_client/models/all_of_sub_model.py index 550b9b9c4..dfb672ce1 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/all_of_sub_model.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/all_of_sub_model.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,42 +14,42 @@ class AllOfSubModel: """ Attributes: a_sub_property (Union[Unset, str]): - type (Union[Unset, str]): + type_ (Union[Unset, str]): type_enum (Union[Unset, AllOfSubModelTypeEnum]): """ a_sub_property: Union[Unset, str] = UNSET - type: Union[Unset, str] = UNSET + type_: Union[Unset, str] = UNSET type_enum: Union[Unset, AllOfSubModelTypeEnum] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a_sub_property = self.a_sub_property - type = self.type + type_ = self.type_ type_enum: Union[Unset, int] = UNSET if not isinstance(self.type_enum, Unset): type_enum = self.type_enum.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if a_sub_property is not UNSET: field_dict["a_sub_property"] = a_sub_property - if type is not UNSET: - field_dict["type"] = type + if type_ is not UNSET: + field_dict["type"] = type_ if type_enum is not UNSET: field_dict["type_enum"] = type_enum return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() a_sub_property = d.pop("a_sub_property", UNSET) - type = d.pop("type", UNSET) + type_ = d.pop("type", UNSET) _type_enum = d.pop("type_enum", UNSET) type_enum: Union[Unset, AllOfSubModelTypeEnum] @@ -60,7 +60,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: all_of_sub_model = cls( a_sub_property=a_sub_property, - type=type, + type_=type_, type_enum=type_enum, ) @@ -68,7 +68,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return all_of_sub_model @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_a_item.py b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_a_item.py index b7792fefc..02e9cfa4b 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_a_item.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_a_item.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class AnArrayWithACircularRefInItemsObjectAItem: """ Attributes: - circular (Union[Unset, List['AnArrayWithACircularRefInItemsObjectBItem']]): + circular (Union[Unset, list['AnArrayWithACircularRefInItemsObjectBItem']]): """ - circular: Union[Unset, List["AnArrayWithACircularRefInItemsObjectBItem"]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + circular: Union[Unset, list["AnArrayWithACircularRefInItemsObjectBItem"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - circular: Union[Unset, List[Dict[str, Any]]] = UNSET + def to_dict(self) -> dict[str, Any]: + circular: Union[Unset, list[dict[str, Any]]] = UNSET if not isinstance(self.circular, Unset): circular = [] for componentsschemas_an_array_with_a_circular_ref_in_items_object_b_item_data in self.circular: @@ -32,7 +32,7 @@ def to_dict(self) -> Dict[str, Any]: ) circular.append(componentsschemas_an_array_with_a_circular_ref_in_items_object_b_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if circular is not UNSET: @@ -41,7 +41,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.an_array_with_a_circular_ref_in_items_object_b_item import ( AnArrayWithACircularRefInItemsObjectBItem, ) @@ -66,7 +66,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return an_array_with_a_circular_ref_in_items_object_a_item @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_a_item.py b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_a_item.py index c505553b6..c72c0160a 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_a_item.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_a_item.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +16,12 @@ class AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem: """ """ - additional_properties: Dict[str, List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem"]] = ( + additional_properties: dict[str, list["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem"]] = ( _attrs_field(init=False, factory=dict) ) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = [] for ( @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.an_array_with_a_circular_ref_in_items_object_additional_properties_b_item import ( AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem, ) @@ -68,14 +68,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return an_array_with_a_circular_ref_in_items_object_additional_properties_a_item @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem"]: + def __getitem__(self, key: str) -> list["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem"]: return self.additional_properties[key] def __setitem__( - self, key: str, value: List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem"] + self, key: str, value: list["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem"] ) -> None: self.additional_properties[key] = value diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_b_item.py b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_b_item.py index 9d2dc9827..7ffb50a16 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_b_item.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_b_item.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +16,12 @@ class AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem: """ """ - additional_properties: Dict[str, List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem"]] = ( + additional_properties: dict[str, list["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem"]] = ( _attrs_field(init=False, factory=dict) ) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = [] for ( @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.an_array_with_a_circular_ref_in_items_object_additional_properties_a_item import ( AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem, ) @@ -68,14 +68,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return an_array_with_a_circular_ref_in_items_object_additional_properties_b_item @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem"]: + def __getitem__(self, key: str) -> list["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem"]: return self.additional_properties[key] def __setitem__( - self, key: str, value: List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem"] + self, key: str, value: list["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem"] ) -> None: self.additional_properties[key] = value diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_b_item.py b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_b_item.py index 622d5d999..6d5e83a65 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_b_item.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_b_item.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class AnArrayWithACircularRefInItemsObjectBItem: """ Attributes: - circular (Union[Unset, List['AnArrayWithACircularRefInItemsObjectAItem']]): + circular (Union[Unset, list['AnArrayWithACircularRefInItemsObjectAItem']]): """ - circular: Union[Unset, List["AnArrayWithACircularRefInItemsObjectAItem"]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + circular: Union[Unset, list["AnArrayWithACircularRefInItemsObjectAItem"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - circular: Union[Unset, List[Dict[str, Any]]] = UNSET + def to_dict(self) -> dict[str, Any]: + circular: Union[Unset, list[dict[str, Any]]] = UNSET if not isinstance(self.circular, Unset): circular = [] for componentsschemas_an_array_with_a_circular_ref_in_items_object_a_item_data in self.circular: @@ -32,7 +32,7 @@ def to_dict(self) -> Dict[str, Any]: ) circular.append(componentsschemas_an_array_with_a_circular_ref_in_items_object_a_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if circular is not UNSET: @@ -41,7 +41,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.an_array_with_a_circular_ref_in_items_object_a_item import ( AnArrayWithACircularRefInItemsObjectAItem, ) @@ -66,7 +66,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return an_array_with_a_circular_ref_in_items_object_b_item @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_additional_properties_item.py b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_additional_properties_item.py index e19cfc052..14dc6ba26 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_additional_properties_item.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_additional_properties_item.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,12 +10,12 @@ class AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem: """ """ - additional_properties: Dict[str, List["AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem"]] = ( + additional_properties: dict[str, list["AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem"]] = ( _attrs_field(init=False, factory=dict) ) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = [] for componentsschemas_an_array_with_a_recursive_ref_in_items_object_additional_properties_item_data in prop: @@ -27,7 +27,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() an_array_with_a_recursive_ref_in_items_object_additional_properties_item = cls() @@ -56,14 +56,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return an_array_with_a_recursive_ref_in_items_object_additional_properties_item @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> List["AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem"]: + def __getitem__(self, key: str) -> list["AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem"]: return self.additional_properties[key] def __setitem__( - self, key: str, value: List["AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem"] + self, key: str, value: list["AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem"] ) -> None: self.additional_properties[key] = value diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_item.py b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_item.py index 6b12b9b5d..c8629e83d 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_item.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_item.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,14 +12,14 @@ class AnArrayWithARecursiveRefInItemsObjectItem: """ Attributes: - recursive (Union[Unset, List['AnArrayWithARecursiveRefInItemsObjectItem']]): + recursive (Union[Unset, list['AnArrayWithARecursiveRefInItemsObjectItem']]): """ - recursive: Union[Unset, List["AnArrayWithARecursiveRefInItemsObjectItem"]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + recursive: Union[Unset, list["AnArrayWithARecursiveRefInItemsObjectItem"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - recursive: Union[Unset, List[Dict[str, Any]]] = UNSET + def to_dict(self) -> dict[str, Any]: + recursive: Union[Unset, list[dict[str, Any]]] = UNSET if not isinstance(self.recursive, Unset): recursive = [] for componentsschemas_an_array_with_a_recursive_ref_in_items_object_item_data in self.recursive: @@ -28,7 +28,7 @@ def to_dict(self) -> Dict[str, Any]: ) recursive.append(componentsschemas_an_array_with_a_recursive_ref_in_items_object_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if recursive is not UNSET: @@ -37,7 +37,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() recursive = [] _recursive = d.pop("recursive", UNSET) @@ -58,7 +58,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return an_array_with_a_recursive_ref_in_items_object_item @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/another_all_of_sub_model.py b/end_to_end_tests/golden-record/my_test_api_client/models/another_all_of_sub_model.py index fde2bb6f8..df2d9b2cd 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/another_all_of_sub_model.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/another_all_of_sub_model.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,49 +15,49 @@ class AnotherAllOfSubModel: """ Attributes: another_sub_property (Union[Unset, str]): - type (Union[Unset, AnotherAllOfSubModelType]): + type_ (Union[Unset, AnotherAllOfSubModelType]): type_enum (Union[Unset, AnotherAllOfSubModelTypeEnum]): """ another_sub_property: Union[Unset, str] = UNSET - type: Union[Unset, AnotherAllOfSubModelType] = UNSET + type_: Union[Unset, AnotherAllOfSubModelType] = UNSET type_enum: Union[Unset, AnotherAllOfSubModelTypeEnum] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: another_sub_property = self.another_sub_property - type: Union[Unset, str] = UNSET - if not isinstance(self.type, Unset): - type = self.type.value + type_: Union[Unset, str] = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value type_enum: Union[Unset, int] = UNSET if not isinstance(self.type_enum, Unset): type_enum = self.type_enum.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if another_sub_property is not UNSET: field_dict["another_sub_property"] = another_sub_property - if type is not UNSET: - field_dict["type"] = type + if type_ is not UNSET: + field_dict["type"] = type_ if type_enum is not UNSET: field_dict["type_enum"] = type_enum return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() another_sub_property = d.pop("another_sub_property", UNSET) - _type = d.pop("type", UNSET) - type: Union[Unset, AnotherAllOfSubModelType] - if isinstance(_type, Unset): - type = UNSET + _type_ = d.pop("type", UNSET) + type_: Union[Unset, AnotherAllOfSubModelType] + if isinstance(_type_, Unset): + type_ = UNSET else: - type = AnotherAllOfSubModelType(_type) + type_ = AnotherAllOfSubModelType(_type_) _type_enum = d.pop("type_enum", UNSET) type_enum: Union[Unset, AnotherAllOfSubModelTypeEnum] @@ -68,7 +68,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: another_all_of_sub_model = cls( another_sub_property=another_sub_property, - type=type, + type_=type_, type_enum=type_enum, ) @@ -76,7 +76,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return another_all_of_sub_model @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post.py b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post.py index 9c1a1e7e6..4bcc53863 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post.py @@ -1,7 +1,7 @@ import datetime import json from io import BytesIO -from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -41,8 +41,8 @@ class BodyUploadFileTestsUploadPost: a_date (Union[Unset, datetime.date]): some_number (Union[Unset, float]): some_nullable_number (Union[None, Unset, float]): - some_int_array (Union[Unset, List[Union[None, int]]]): - some_array (Union[List['AFormData'], None, Unset]): + some_int_array (Union[Unset, list[Union[None, int]]]): + some_array (Union[None, Unset, list['AFormData']]): some_optional_object (Union[Unset, BodyUploadFileTestsUploadPostSomeOptionalObject]): some_enum (Union[Unset, DifferentEnum]): An enumeration. """ @@ -57,15 +57,15 @@ class BodyUploadFileTestsUploadPost: a_date: Union[Unset, datetime.date] = UNSET some_number: Union[Unset, float] = UNSET some_nullable_number: Union[None, Unset, float] = UNSET - some_int_array: Union[Unset, List[Union[None, int]]] = UNSET - some_array: Union[List["AFormData"], None, Unset] = UNSET + some_int_array: Union[Unset, list[Union[None, int]]] = UNSET + some_array: Union[None, Unset, list["AFormData"]] = UNSET some_optional_object: Union[Unset, "BodyUploadFileTestsUploadPostSomeOptionalObject"] = UNSET some_enum: Union[Unset, DifferentEnum] = UNSET - additional_properties: Dict[str, "BodyUploadFileTestsUploadPostAdditionalProperty"] = _attrs_field( + additional_properties: dict[str, "BodyUploadFileTestsUploadPostAdditionalProperty"] = _attrs_field( init=False, factory=dict ) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.body_upload_file_tests_upload_post_some_nullable_object import ( BodyUploadFileTestsUploadPostSomeNullableObject, ) @@ -76,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: some_object = self.some_object.to_dict() - some_nullable_object: Union[Dict[str, Any], None] + some_nullable_object: Union[None, dict[str, Any]] if isinstance(self.some_nullable_object, BodyUploadFileTestsUploadPostSomeNullableObject): some_nullable_object = self.some_nullable_object.to_dict() else: @@ -104,7 +104,7 @@ def to_dict(self) -> Dict[str, Any]: else: some_nullable_number = self.some_nullable_number - some_int_array: Union[Unset, List[Union[None, int]]] = UNSET + some_int_array: Union[Unset, list[Union[None, int]]] = UNSET if not isinstance(self.some_int_array, Unset): some_int_array = [] for some_int_array_item_data in self.some_int_array: @@ -112,7 +112,7 @@ def to_dict(self) -> Dict[str, Any]: some_int_array_item = some_int_array_item_data some_int_array.append(some_int_array_item) - some_array: Union[List[Dict[str, Any]], None, Unset] + some_array: Union[None, Unset, list[dict[str, Any]]] if isinstance(self.some_array, Unset): some_array = UNSET elif isinstance(self.some_array, list): @@ -124,7 +124,7 @@ def to_dict(self) -> Dict[str, Any]: else: some_array = self.some_array - some_optional_object: Union[Unset, Dict[str, Any]] = UNSET + some_optional_object: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.some_optional_object, Unset): some_optional_object = self.some_optional_object.to_dict() @@ -132,7 +132,7 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.some_enum, Unset): some_enum = self.some_enum.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop.to_dict() field_dict.update( @@ -166,14 +166,14 @@ def to_dict(self) -> Dict[str, Any]: return field_dict - def to_multipart(self) -> Dict[str, Any]: + def to_multipart(self) -> dict[str, Any]: some_file = self.some_file.to_tuple() some_required_number = (None, str(self.some_required_number).encode(), "text/plain") some_object = (None, json.dumps(self.some_object.to_dict()).encode(), "application/json") - some_nullable_object: Tuple[None, bytes, str] + some_nullable_object: tuple[None, bytes, str] if isinstance(self.some_nullable_object, BodyUploadFileTestsUploadPostSomeNullableObject): some_nullable_object = (None, json.dumps(self.some_nullable_object.to_dict()).encode(), "application/json") @@ -204,7 +204,7 @@ def to_multipart(self) -> Dict[str, Any]: else (None, str(self.some_number).encode(), "text/plain") ) - some_nullable_number: Union[Tuple[None, bytes, str], Unset] + some_nullable_number: Union[Unset, tuple[None, bytes, str]] if isinstance(self.some_nullable_number, Unset): some_nullable_number = UNSET @@ -213,7 +213,7 @@ def to_multipart(self) -> Dict[str, Any]: else: some_nullable_number = (None, str(self.some_nullable_number).encode(), "text/plain") - some_int_array: Union[Unset, Tuple[None, bytes, str]] = UNSET + some_int_array: Union[Unset, tuple[None, bytes, str]] = UNSET if not isinstance(self.some_int_array, Unset): _temp_some_int_array = [] for some_int_array_item_data in self.some_int_array: @@ -222,7 +222,7 @@ def to_multipart(self) -> Dict[str, Any]: _temp_some_int_array.append(some_int_array_item) some_int_array = (None, json.dumps(_temp_some_int_array).encode(), "application/json") - some_array: Union[Tuple[None, bytes, str], Unset] + some_array: Union[Unset, tuple[None, bytes, str]] if isinstance(self.some_array, Unset): some_array = UNSET @@ -235,15 +235,15 @@ def to_multipart(self) -> Dict[str, Any]: else: some_array = (None, str(self.some_array).encode(), "text/plain") - some_optional_object: Union[Unset, Tuple[None, bytes, str]] = UNSET + some_optional_object: Union[Unset, tuple[None, bytes, str]] = UNSET if not isinstance(self.some_optional_object, Unset): some_optional_object = (None, json.dumps(self.some_optional_object.to_dict()).encode(), "application/json") - some_enum: Union[Unset, Tuple[None, bytes, str]] = UNSET + some_enum: Union[Unset, tuple[None, bytes, str]] = UNSET if not isinstance(self.some_enum, Unset): some_enum = (None, str(self.some_enum.value).encode(), "text/plain") - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = (None, json.dumps(prop.to_dict()).encode(), "application/json") field_dict.update( @@ -278,7 +278,7 @@ def to_multipart(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.a_form_data import AFormData from ..models.body_upload_file_tests_upload_post_additional_property import ( BodyUploadFileTestsUploadPostAdditionalProperty, @@ -360,7 +360,7 @@ def _parse_some_int_array_item(data: object) -> Union[None, int]: some_int_array.append(some_int_array_item) - def _parse_some_array(data: object) -> Union[List["AFormData"], None, Unset]: + def _parse_some_array(data: object) -> Union[None, Unset, list["AFormData"]]: if data is None: return data if isinstance(data, Unset): @@ -378,7 +378,7 @@ def _parse_some_array(data: object) -> Union[List["AFormData"], None, Unset]: return some_array_type_0 except: # noqa: E722 pass - return cast(Union[List["AFormData"], None, Unset], data) + return cast(Union[None, Unset, list["AFormData"]], data) some_array = _parse_some_array(d.pop("some_array", UNSET)) @@ -423,7 +423,7 @@ def _parse_some_array(data: object) -> Union[List["AFormData"], None, Unset]: return body_upload_file_tests_upload_post @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> "BodyUploadFileTestsUploadPostAdditionalProperty": diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_additional_property.py b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_additional_property.py index f855d9c61..47dde1338 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_additional_property.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_additional_property.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +16,12 @@ class BodyUploadFileTestsUploadPostAdditionalProperty: """ foo: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: foo = self.foo - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if foo is not UNSET: @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() foo = d.pop("foo", UNSET) @@ -42,7 +42,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return body_upload_file_tests_upload_post_additional_property @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_nullable_object.py b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_nullable_object.py index 9762b7efa..817dfd789 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_nullable_object.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_nullable_object.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +16,12 @@ class BodyUploadFileTestsUploadPostSomeNullableObject: """ bar: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: bar = self.bar - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if bar is not UNSET: @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() bar = d.pop("bar", UNSET) @@ -42,7 +42,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return body_upload_file_tests_upload_post_some_nullable_object @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_object.py b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_object.py index 25c2c0a6a..a074bb86f 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_object.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_object.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class BodyUploadFileTestsUploadPostSomeObject: num: float text: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: num = self.num text = self.text - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() num = d.pop("num") @@ -50,7 +50,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return body_upload_file_tests_upload_post_some_object @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_optional_object.py b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_optional_object.py index 711b34e63..e0ba4b364 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_optional_object.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_optional_object.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,12 +14,12 @@ class BodyUploadFileTestsUploadPostSomeOptionalObject: """ foo: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: foo = self.foo - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() foo = d.pop("foo") @@ -42,7 +42,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return body_upload_file_tests_upload_post_some_optional_object @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/extended.py b/end_to_end_tests/golden-record/my_test_api_client/models/extended.py index b51540cab..6ba22347e 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/extended.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/extended.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from uuid import UUID from attrs import define as _attrs_define @@ -38,7 +38,7 @@ class Extended: nullable_model (Union['ModelWithUnionProperty', None]): any_value (Union[Unset, Any]): Default: 'default'. an_optional_allof_enum (Union[Unset, AnAllOfEnum]): - nested_list_of_enums (Union[Unset, List[List[DifferentEnum]]]): + nested_list_of_enums (Union[Unset, list[list[DifferentEnum]]]): a_not_required_date (Union[Unset, datetime.date]): a_not_required_uuid (Union[Unset, UUID]): attr_1_leading_digit (Union[Unset, str]): @@ -67,7 +67,7 @@ class Extended: a_nullable_uuid: Union[None, UUID] = UUID("07EF8B4D-AA09-4FFA-898D-C710796AFF41") any_value: Union[Unset, Any] = "default" an_optional_allof_enum: Union[Unset, AnAllOfEnum] = UNSET - nested_list_of_enums: Union[Unset, List[List[DifferentEnum]]] = UNSET + nested_list_of_enums: Union[Unset, list[list[DifferentEnum]]] = UNSET a_not_required_date: Union[Unset, datetime.date] = UNSET a_not_required_uuid: Union[Unset, UUID] = UNSET attr_1_leading_digit: Union[Unset, str] = UNSET @@ -79,9 +79,9 @@ class Extended: not_required_model: Union[Unset, "ModelWithUnionProperty"] = UNSET not_required_nullable_model: Union["ModelWithUnionProperty", None, Unset] = UNSET from_extended: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.free_form_model import FreeFormModel from ..models.model_with_union_property import ModelWithUnionProperty @@ -116,7 +116,7 @@ def to_dict(self) -> Dict[str, Any]: required_not_nullable = self.required_not_nullable - one_of_models: Union[Any, Dict[str, Any]] + one_of_models: Union[Any, dict[str, Any]] if isinstance(self.one_of_models, FreeFormModel): one_of_models = self.one_of_models.to_dict() elif isinstance(self.one_of_models, ModelWithUnionProperty): @@ -124,7 +124,7 @@ def to_dict(self) -> Dict[str, Any]: else: one_of_models = self.one_of_models - nullable_one_of_models: Union[Dict[str, Any], None] + nullable_one_of_models: Union[None, dict[str, Any]] if isinstance(self.nullable_one_of_models, FreeFormModel): nullable_one_of_models = self.nullable_one_of_models.to_dict() elif isinstance(self.nullable_one_of_models, ModelWithUnionProperty): @@ -134,7 +134,7 @@ def to_dict(self) -> Dict[str, Any]: model = self.model.to_dict() - nullable_model: Union[Dict[str, Any], None] + nullable_model: Union[None, dict[str, Any]] if isinstance(self.nullable_model, ModelWithUnionProperty): nullable_model = self.nullable_model.to_dict() else: @@ -146,7 +146,7 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.an_optional_allof_enum, Unset): an_optional_allof_enum = self.an_optional_allof_enum.value - nested_list_of_enums: Union[Unset, List[List[str]]] = UNSET + nested_list_of_enums: Union[Unset, list[list[str]]] = UNSET if not isinstance(self.nested_list_of_enums, Unset): nested_list_of_enums = [] for nested_list_of_enums_item_data in self.nested_list_of_enums: @@ -177,7 +177,7 @@ def to_dict(self) -> Dict[str, Any]: not_required_not_nullable = self.not_required_not_nullable - not_required_one_of_models: Union[Dict[str, Any], Unset] + not_required_one_of_models: Union[Unset, dict[str, Any]] if isinstance(self.not_required_one_of_models, Unset): not_required_one_of_models = UNSET elif isinstance(self.not_required_one_of_models, FreeFormModel): @@ -185,7 +185,7 @@ def to_dict(self) -> Dict[str, Any]: else: not_required_one_of_models = self.not_required_one_of_models.to_dict() - not_required_nullable_one_of_models: Union[Dict[str, Any], None, Unset, str] + not_required_nullable_one_of_models: Union[None, Unset, dict[str, Any], str] if isinstance(self.not_required_nullable_one_of_models, Unset): not_required_nullable_one_of_models = UNSET elif isinstance(self.not_required_nullable_one_of_models, FreeFormModel): @@ -195,11 +195,11 @@ def to_dict(self) -> Dict[str, Any]: else: not_required_nullable_one_of_models = self.not_required_nullable_one_of_models - not_required_model: Union[Unset, Dict[str, Any]] = UNSET + not_required_model: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.not_required_model, Unset): not_required_model = self.not_required_model.to_dict() - not_required_nullable_model: Union[Dict[str, Any], None, Unset] + not_required_nullable_model: Union[None, Unset, dict[str, Any]] if isinstance(self.not_required_nullable_model, Unset): not_required_nullable_model = UNSET elif isinstance(self.not_required_nullable_model, ModelWithUnionProperty): @@ -209,7 +209,7 @@ def to_dict(self) -> Dict[str, Any]: from_extended = self.from_extended - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -260,7 +260,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.free_form_model import FreeFormModel from ..models.model_with_union_property import ModelWithUnionProperty @@ -548,7 +548,7 @@ def _parse_not_required_nullable_model(data: object) -> Union["ModelWithUnionPro return extended @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/free_form_model.py b/end_to_end_tests/golden-record/my_test_api_client/models/free_form_model.py index f757b10ae..10770503b 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/free_form_model.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/free_form_model.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,16 +10,16 @@ class FreeFormModel: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() free_form_model = cls() @@ -27,7 +27,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return free_form_model @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/get_models_allof_response_200.py b/end_to_end_tests/golden-record/my_test_api_client/models/get_models_allof_response_200.py index 2662dc1f4..5e24734e3 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/get_models_allof_response_200.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/get_models_allof_response_200.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,22 +25,22 @@ class GetModelsAllofResponse200: aliased: Union[Unset, "AModel"] = UNSET extended: Union[Unset, "Extended"] = UNSET model: Union[Unset, "AModel"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - aliased: Union[Unset, Dict[str, Any]] = UNSET + def to_dict(self) -> dict[str, Any]: + aliased: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.aliased, Unset): aliased = self.aliased.to_dict() - extended: Union[Unset, Dict[str, Any]] = UNSET + extended: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.extended, Unset): extended = self.extended.to_dict() - model: Union[Unset, Dict[str, Any]] = UNSET + model: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.model, Unset): model = self.model.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if aliased is not UNSET: @@ -53,7 +53,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.a_model import AModel from ..models.extended import Extended @@ -89,7 +89,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return get_models_allof_response_200 @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/get_models_oneof_with_required_const_response_200_type_0.py b/end_to_end_tests/golden-record/my_test_api_client/models/get_models_oneof_with_required_const_response_200_type_0.py index 972e1c765..18c1e9e64 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/get_models_oneof_with_required_const_response_200_type_0.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/get_models_oneof_with_required_const_response_200_type_0.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Literal, Type, TypeVar, Union, cast +from typing import Any, Literal, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,24 +12,24 @@ class GetModelsOneofWithRequiredConstResponse200Type0: """ Attributes: - type (Literal['alpha']): + type_ (Literal['alpha']): color (Union[Unset, str]): """ - type: Literal["alpha"] + type_: Literal["alpha"] color: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - type = self.type + def to_dict(self) -> dict[str, Any]: + type_ = self.type_ color = self.color - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { - "type": type, + "type": type_, } ) if color is not UNSET: @@ -38,16 +38,16 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() - type = cast(Literal["alpha"], d.pop("type")) - if type != "alpha": - raise ValueError(f"type must match const 'alpha', got '{type}'") + type_ = cast(Literal["alpha"], d.pop("type")) + if type_ != "alpha": + raise ValueError(f"type must match const 'alpha', got '{type_}'") color = d.pop("color", UNSET) get_models_oneof_with_required_const_response_200_type_0 = cls( - type=type, + type_=type_, color=color, ) @@ -55,7 +55,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return get_models_oneof_with_required_const_response_200_type_0 @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/get_models_oneof_with_required_const_response_200_type_1.py b/end_to_end_tests/golden-record/my_test_api_client/models/get_models_oneof_with_required_const_response_200_type_1.py index 4596c3cc4..b1df54c32 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/get_models_oneof_with_required_const_response_200_type_1.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/get_models_oneof_with_required_const_response_200_type_1.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Literal, Type, TypeVar, Union, cast +from typing import Any, Literal, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,24 +12,24 @@ class GetModelsOneofWithRequiredConstResponse200Type1: """ Attributes: - type (Literal['beta']): + type_ (Literal['beta']): texture (Union[Unset, str]): """ - type: Literal["beta"] + type_: Literal["beta"] texture: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - type = self.type + def to_dict(self) -> dict[str, Any]: + type_ = self.type_ texture = self.texture - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { - "type": type, + "type": type_, } ) if texture is not UNSET: @@ -38,16 +38,16 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() - type = cast(Literal["beta"], d.pop("type")) - if type != "beta": - raise ValueError(f"type must match const 'beta', got '{type}'") + type_ = cast(Literal["beta"], d.pop("type")) + if type_ != "beta": + raise ValueError(f"type must match const 'beta', got '{type_}'") texture = d.pop("texture", UNSET) get_models_oneof_with_required_const_response_200_type_1 = cls( - type=type, + type_=type_, texture=texture, ) @@ -55,7 +55,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return get_models_oneof_with_required_const_response_200_type_1 @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/http_validation_error.py b/end_to_end_tests/golden-record/my_test_api_client/models/http_validation_error.py index 1f04c29d0..a423c6d2f 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/http_validation_error.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/http_validation_error.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define @@ -15,20 +15,20 @@ class HTTPValidationError: """ Attributes: - detail (Union[Unset, List['ValidationError']]): + detail (Union[Unset, list['ValidationError']]): """ - detail: Union[Unset, List["ValidationError"]] = UNSET + detail: Union[Unset, list["ValidationError"]] = UNSET - def to_dict(self) -> Dict[str, Any]: - detail: Union[Unset, List[Dict[str, Any]]] = UNSET + def to_dict(self) -> dict[str, Any]: + detail: Union[Unset, list[dict[str, Any]]] = UNSET if not isinstance(self.detail, Unset): detail = [] for detail_item_data in self.detail: detail_item = detail_item_data.to_dict() detail.append(detail_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update({}) if detail is not UNSET: field_dict["detail"] = detail @@ -36,7 +36,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.validation_error import ValidationError d = src_dict.copy() diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/import_.py b/end_to_end_tests/golden-record/my_test_api_client/models/import_.py index 85cc594e7..79788bf80 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/import_.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/import_.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,16 +10,16 @@ class Import: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() import_ = cls() @@ -27,7 +27,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return import_ @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/json_like_body.py b/end_to_end_tests/golden-record/my_test_api_client/models/json_like_body.py index 623dcd848..bb4a31010 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/json_like_body.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/json_like_body.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +16,12 @@ class JsonLikeBody: """ a: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a = self.a - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if a is not UNSET: @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() a = d.pop("a", UNSET) @@ -42,7 +42,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return json_like_body @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/mixed_case_response_200.py b/end_to_end_tests/golden-record/my_test_api_client/models/mixed_case_response_200.py index 21bdd918d..adb74459d 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/mixed_case_response_200.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/mixed_case_response_200.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +18,14 @@ class MixedCaseResponse200: mixed_case: Union[Unset, str] = UNSET mixedCase: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: mixed_case = self.mixed_case mixedCase = self.mixedCase - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if mixed_case is not UNSET: @@ -36,7 +36,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() mixed_case = d.pop("mixed_case", UNSET) @@ -51,7 +51,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return mixed_case_response_200 @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_from_all_of.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_from_all_of.py index 6414b790d..a9fb59976 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_from_all_of.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_from_all_of.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -15,23 +15,23 @@ class ModelFromAllOf: """ Attributes: a_sub_property (Union[Unset, str]): - type (Union[Unset, AnotherAllOfSubModelType]): + type_ (Union[Unset, AnotherAllOfSubModelType]): type_enum (Union[Unset, AnotherAllOfSubModelTypeEnum]): another_sub_property (Union[Unset, str]): """ a_sub_property: Union[Unset, str] = UNSET - type: Union[Unset, AnotherAllOfSubModelType] = UNSET + type_: Union[Unset, AnotherAllOfSubModelType] = UNSET type_enum: Union[Unset, AnotherAllOfSubModelTypeEnum] = UNSET another_sub_property: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a_sub_property = self.a_sub_property - type: Union[Unset, str] = UNSET - if not isinstance(self.type, Unset): - type = self.type.value + type_: Union[Unset, str] = UNSET + if not isinstance(self.type_, Unset): + type_ = self.type_.value type_enum: Union[Unset, int] = UNSET if not isinstance(self.type_enum, Unset): @@ -39,13 +39,13 @@ def to_dict(self) -> Dict[str, Any]: another_sub_property = self.another_sub_property - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if a_sub_property is not UNSET: field_dict["a_sub_property"] = a_sub_property - if type is not UNSET: - field_dict["type"] = type + if type_ is not UNSET: + field_dict["type"] = type_ if type_enum is not UNSET: field_dict["type_enum"] = type_enum if another_sub_property is not UNSET: @@ -54,16 +54,16 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() a_sub_property = d.pop("a_sub_property", UNSET) - _type = d.pop("type", UNSET) - type: Union[Unset, AnotherAllOfSubModelType] - if isinstance(_type, Unset): - type = UNSET + _type_ = d.pop("type", UNSET) + type_: Union[Unset, AnotherAllOfSubModelType] + if isinstance(_type_, Unset): + type_ = UNSET else: - type = AnotherAllOfSubModelType(_type) + type_ = AnotherAllOfSubModelType(_type_) _type_enum = d.pop("type_enum", UNSET) type_enum: Union[Unset, AnotherAllOfSubModelTypeEnum] @@ -76,7 +76,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: model_from_all_of = cls( a_sub_property=a_sub_property, - type=type, + type_=type_, type_enum=type_enum, another_sub_property=another_sub_property, ) @@ -85,7 +85,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_from_all_of @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_name.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_name.py index 2a86db3a2..6f4eefc36 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_name.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_name.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,16 +10,16 @@ class ModelName: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() model_name = cls() @@ -27,7 +27,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_name @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_reference_with_periods.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_reference_with_periods.py index a5ff5d211..004ed9b20 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_reference_with_periods.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_reference_with_periods.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,16 +10,16 @@ class ModelReferenceWithPeriods: """A Model with periods in its reference""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() model_reference_with_periods = cls() @@ -27,7 +27,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_reference_with_periods @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined.py index 761a43e54..a0cdb4f6a 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,14 +22,14 @@ class ModelWithAdditionalPropertiesInlined: """ a_number: Union[Unset, float] = UNSET - additional_properties: Dict[str, "ModelWithAdditionalPropertiesInlinedAdditionalProperty"] = _attrs_field( + additional_properties: dict[str, "ModelWithAdditionalPropertiesInlinedAdditionalProperty"] = _attrs_field( init=False, factory=dict ) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a_number = self.a_number - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop.to_dict() field_dict.update({}) @@ -39,7 +39,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.model_with_additional_properties_inlined_additional_property import ( ModelWithAdditionalPropertiesInlinedAdditionalProperty, ) @@ -61,7 +61,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_additional_properties_inlined @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> "ModelWithAdditionalPropertiesInlinedAdditionalProperty": diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined_additional_property.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined_additional_property.py index e06a94bfc..3bfffaf2c 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined_additional_property.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined_additional_property.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +16,12 @@ class ModelWithAdditionalPropertiesInlinedAdditionalProperty: """ extra_props_prop: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: extra_props_prop = self.extra_props_prop - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if extra_props_prop is not UNSET: @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() extra_props_prop = d.pop("extra_props_prop", UNSET) @@ -42,7 +42,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_additional_properties_inlined_additional_property @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_refed.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_refed.py index b2500f68c..0b80a0076 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_refed.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_refed.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,17 +12,17 @@ class ModelWithAdditionalPropertiesRefed: """ """ - additional_properties: Dict[str, AnEnum] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, AnEnum] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop.value return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() model_with_additional_properties_refed = cls() @@ -36,7 +36,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_additional_properties_refed @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> AnEnum: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties.py index 89498e3bd..deb8aeea5 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,16 +14,16 @@ class ModelWithAnyJsonProperties: """ """ - additional_properties: Dict[ - str, Union["ModelWithAnyJsonPropertiesAdditionalProperty", List[str], bool, float, int, str] + additional_properties: dict[ + str, Union["ModelWithAnyJsonPropertiesAdditionalProperty", bool, float, int, list[str], str] ] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.model_with_any_json_properties_additional_property import ( ModelWithAnyJsonPropertiesAdditionalProperty, ) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): if isinstance(prop, ModelWithAnyJsonPropertiesAdditionalProperty): field_dict[prop_name] = prop.to_dict() @@ -36,7 +36,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.model_with_any_json_properties_additional_property import ( ModelWithAnyJsonPropertiesAdditionalProperty, ) @@ -49,7 +49,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def _parse_additional_property( data: object, - ) -> Union["ModelWithAnyJsonPropertiesAdditionalProperty", List[str], bool, float, int, str]: + ) -> Union["ModelWithAnyJsonPropertiesAdditionalProperty", bool, float, int, list[str], str]: try: if not isinstance(data, dict): raise TypeError() @@ -61,13 +61,13 @@ def _parse_additional_property( try: if not isinstance(data, list): raise TypeError() - additional_property_type_1 = cast(List[str], data) + additional_property_type_1 = cast(list[str], data) return additional_property_type_1 except: # noqa: E722 pass return cast( - Union["ModelWithAnyJsonPropertiesAdditionalProperty", List[str], bool, float, int, str], data + Union["ModelWithAnyJsonPropertiesAdditionalProperty", bool, float, int, list[str], str], data ) additional_property = _parse_additional_property(prop_dict) @@ -78,16 +78,16 @@ def _parse_additional_property( return model_with_any_json_properties @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__( self, key: str - ) -> Union["ModelWithAnyJsonPropertiesAdditionalProperty", List[str], bool, float, int, str]: + ) -> Union["ModelWithAnyJsonPropertiesAdditionalProperty", bool, float, int, list[str], str]: return self.additional_properties[key] def __setitem__( - self, key: str, value: Union["ModelWithAnyJsonPropertiesAdditionalProperty", List[str], bool, float, int, str] + self, key: str, value: Union["ModelWithAnyJsonPropertiesAdditionalProperty", bool, float, int, list[str], str] ) -> None: self.additional_properties[key] = value diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties_additional_property.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties_additional_property.py index cd6cc851a..e7e244eb7 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties_additional_property.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties_additional_property.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,16 +10,16 @@ class ModelWithAnyJsonPropertiesAdditionalProperty: """ """ - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() model_with_any_json_properties_additional_property = cls() @@ -27,7 +27,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_any_json_properties_additional_property @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> str: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_backslash_in_description.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_backslash_in_description.py index 5de43ddb9..0b5dfc3b5 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_backslash_in_description.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_backslash_in_description.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,16 +12,16 @@ class ModelWithBackslashInDescription: """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() model_with_backslash_in_description = cls() @@ -29,7 +29,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_backslash_in_description @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_a.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_a.py index 73cfb1287..3253c520b 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_a.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_a.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,14 +20,14 @@ class ModelWithCircularRefA: """ circular: Union[Unset, "ModelWithCircularRefB"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - circular: Union[Unset, Dict[str, Any]] = UNSET + def to_dict(self) -> dict[str, Any]: + circular: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.circular, Unset): circular = self.circular.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if circular is not UNSET: @@ -36,7 +36,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.model_with_circular_ref_b import ModelWithCircularRefB d = src_dict.copy() @@ -55,7 +55,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_circular_ref_a @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_b.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_b.py index 0628d89ae..89c3a064c 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_b.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_b.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,14 +20,14 @@ class ModelWithCircularRefB: """ circular: Union[Unset, "ModelWithCircularRefA"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - circular: Union[Unset, Dict[str, Any]] = UNSET + def to_dict(self) -> dict[str, Any]: + circular: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.circular, Unset): circular = self.circular.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if circular is not UNSET: @@ -36,7 +36,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.model_with_circular_ref_a import ModelWithCircularRefA d = src_dict.copy() @@ -55,7 +55,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_circular_ref_b @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_a.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_a.py index 4f1d59c57..32cb687c7 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_a.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_a.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,19 +14,19 @@ class ModelWithCircularRefInAdditionalPropertiesA: """ """ - additional_properties: Dict[str, "ModelWithCircularRefInAdditionalPropertiesB"] = _attrs_field( + additional_properties: dict[str, "ModelWithCircularRefInAdditionalPropertiesB"] = _attrs_field( init=False, factory=dict ) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop.to_dict() return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.model_with_circular_ref_in_additional_properties_b import ( ModelWithCircularRefInAdditionalPropertiesB, ) @@ -44,7 +44,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_circular_ref_in_additional_properties_a @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> "ModelWithCircularRefInAdditionalPropertiesB": diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_b.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_b.py index 3f55584e5..d134a94b9 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_b.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_b.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,19 +14,19 @@ class ModelWithCircularRefInAdditionalPropertiesB: """ """ - additional_properties: Dict[str, "ModelWithCircularRefInAdditionalPropertiesA"] = _attrs_field( + additional_properties: dict[str, "ModelWithCircularRefInAdditionalPropertiesA"] = _attrs_field( init=False, factory=dict ) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop.to_dict() return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.model_with_circular_ref_in_additional_properties_a import ( ModelWithCircularRefInAdditionalPropertiesA, ) @@ -44,7 +44,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_circular_ref_in_additional_properties_b @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> "ModelWithCircularRefInAdditionalPropertiesA": diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_date_time_property.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_date_time_property.py index 658b2352d..f503af00a 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_date_time_property.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_date_time_property.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +18,14 @@ class ModelWithDateTimeProperty: """ datetime_: Union[Unset, datetime.datetime] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: datetime_: Union[Unset, str] = UNSET if not isinstance(self.datetime_, Unset): datetime_ = self.datetime_.isoformat() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if datetime_ is not UNSET: @@ -34,7 +34,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() _datetime_ = d.pop("datetime", UNSET) datetime_: Union[Unset, datetime.datetime] @@ -51,7 +51,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_date_time_property @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_merged_properties.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_merged_properties.py index bcf1efa88..765d107d8 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_merged_properties.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_merged_properties.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,9 +28,9 @@ class ModelWithMergedProperties: string_to_date: Union[Unset, datetime.date] = UNSET number_to_int: Union[Unset, int] = UNSET any_to_string: Union[Unset, str] = "x" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: simple_string = self.simple_string string_to_enum: Union[Unset, str] = UNSET @@ -45,7 +45,7 @@ def to_dict(self) -> Dict[str, Any]: any_to_string = self.any_to_string - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if simple_string is not UNSET: @@ -62,7 +62,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() simple_string = d.pop("simpleString", UNSET) @@ -96,7 +96,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_merged_properties @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_no_properties.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_no_properties.py index 506239f32..24e718e6d 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_no_properties.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_no_properties.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define @@ -9,13 +9,13 @@ class ModelWithNoProperties: """ """ - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: model_with_no_properties = cls() return model_with_no_properties diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties.py index 94afa7653..db13972e9 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,14 +22,14 @@ class ModelWithPrimitiveAdditionalProperties: """ a_date_holder: Union[Unset, "ModelWithPrimitiveAdditionalPropertiesADateHolder"] = UNSET - additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - a_date_holder: Union[Unset, Dict[str, Any]] = UNSET + def to_dict(self) -> dict[str, Any]: + a_date_holder: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.a_date_holder, Unset): a_date_holder = self.a_date_holder.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if a_date_holder is not UNSET: @@ -38,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.model_with_primitive_additional_properties_a_date_holder import ( ModelWithPrimitiveAdditionalPropertiesADateHolder, ) @@ -59,7 +59,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_primitive_additional_properties @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> str: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties_a_date_holder.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties_a_date_holder.py index b9920fc60..f53f968ac 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties_a_date_holder.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties_a_date_holder.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,17 +12,17 @@ class ModelWithPrimitiveAdditionalPropertiesADateHolder: """ """ - additional_properties: Dict[str, datetime.datetime] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, datetime.datetime] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop.isoformat() return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() model_with_primitive_additional_properties_a_date_holder = cls() @@ -36,7 +36,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_primitive_additional_properties_a_date_holder @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> datetime.datetime: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_property_ref.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_property_ref.py index f54afdee8..d8ef017e0 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_property_ref.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_property_ref.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,14 +20,14 @@ class ModelWithPropertyRef: """ inner: Union[Unset, "ModelName"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - inner: Union[Unset, Dict[str, Any]] = UNSET + def to_dict(self) -> dict[str, Any]: + inner: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.inner, Unset): inner = self.inner.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if inner is not UNSET: @@ -36,7 +36,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.model_name import ModelName d = src_dict.copy() @@ -55,7 +55,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_property_ref @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref.py index 578bca7e0..f7370d6f1 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,14 +16,14 @@ class ModelWithRecursiveRef: """ recursive: Union[Unset, "ModelWithRecursiveRef"] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - recursive: Union[Unset, Dict[str, Any]] = UNSET + def to_dict(self) -> dict[str, Any]: + recursive: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.recursive, Unset): recursive = self.recursive.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if recursive is not UNSET: @@ -32,7 +32,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() _recursive = d.pop("recursive", UNSET) recursive: Union[Unset, ModelWithRecursiveRef] @@ -49,7 +49,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_recursive_ref @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref_in_additional_properties.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref_in_additional_properties.py index 2ed2526f5..961b82697 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref_in_additional_properties.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref_in_additional_properties.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,19 +10,19 @@ class ModelWithRecursiveRefInAdditionalProperties: """ """ - additional_properties: Dict[str, "ModelWithRecursiveRefInAdditionalProperties"] = _attrs_field( + additional_properties: dict[str, "ModelWithRecursiveRefInAdditionalProperties"] = _attrs_field( init=False, factory=dict ) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop.to_dict() return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() model_with_recursive_ref_in_additional_properties = cls() @@ -36,7 +36,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_recursive_ref_in_additional_properties @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> "ModelWithRecursiveRefInAdditionalProperties": diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property.py index 890010b78..e818fc69b 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define @@ -18,7 +18,7 @@ class ModelWithUnionProperty: a_property: Union[AnEnum, AnIntEnum, Unset] = UNSET - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a_property: Union[Unset, int, str] if isinstance(self.a_property, Unset): a_property = UNSET @@ -27,7 +27,7 @@ def to_dict(self) -> Dict[str, Any]: else: a_property = self.a_property.value - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update({}) if a_property is not UNSET: field_dict["a_property"] = a_property @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() def _parse_a_property(data: object) -> Union[AnEnum, AnIntEnum, Unset]: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined.py index 2a832e21a..659496eb6 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define @@ -21,10 +21,10 @@ class ModelWithUnionPropertyInlined: fruit: Union["ModelWithUnionPropertyInlinedFruitType0", "ModelWithUnionPropertyInlinedFruitType1", Unset] = UNSET - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.model_with_union_property_inlined_fruit_type_0 import ModelWithUnionPropertyInlinedFruitType0 - fruit: Union[Dict[str, Any], Unset] + fruit: Union[Unset, dict[str, Any]] if isinstance(self.fruit, Unset): fruit = UNSET elif isinstance(self.fruit, ModelWithUnionPropertyInlinedFruitType0): @@ -32,7 +32,7 @@ def to_dict(self) -> Dict[str, Any]: else: fruit = self.fruit.to_dict() - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update({}) if fruit is not UNSET: field_dict["fruit"] = fruit @@ -40,7 +40,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.model_with_union_property_inlined_fruit_type_0 import ModelWithUnionPropertyInlinedFruitType0 from ..models.model_with_union_property_inlined_fruit_type_1 import ModelWithUnionPropertyInlinedFruitType1 diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_0.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_0.py index b0f25360a..4678b4cef 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_0.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_0.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +16,12 @@ class ModelWithUnionPropertyInlinedFruitType0: """ apples: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: apples = self.apples - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if apples is not UNSET: @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() apples = d.pop("apples", UNSET) @@ -42,7 +42,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_union_property_inlined_fruit_type_0 @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_1.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_1.py index 1a32f2445..d70e54234 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_1.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_1.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +16,12 @@ class ModelWithUnionPropertyInlinedFruitType1: """ bananas: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: bananas = self.bananas - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if bananas is not UNSET: @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() bananas = d.pop("bananas", UNSET) @@ -42,7 +42,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return model_with_union_property_inlined_fruit_type_1 @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/none.py b/end_to_end_tests/golden-record/my_test_api_client/models/none.py index 3510497bf..23cb7d679 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/none.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/none.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,16 +10,16 @@ class None_: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() none = cls() @@ -27,7 +27,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return none @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/post_bodies_multiple_data_body.py b/end_to_end_tests/golden-record/my_test_api_client/models/post_bodies_multiple_data_body.py index adc78cd6f..ba36efef2 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/post_bodies_multiple_data_body.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/post_bodies_multiple_data_body.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +16,12 @@ class PostBodiesMultipleDataBody: """ a: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a = self.a - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if a is not UNSET: @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() a = d.pop("a", UNSET) @@ -42,7 +42,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return post_bodies_multiple_data_body @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/post_bodies_multiple_files_body.py b/end_to_end_tests/golden-record/my_test_api_client/models/post_bodies_multiple_files_body.py index c81dc7636..188abf39e 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/post_bodies_multiple_files_body.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/post_bodies_multiple_files_body.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +16,12 @@ class PostBodiesMultipleFilesBody: """ a: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a = self.a - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if a is not UNSET: @@ -29,10 +29,10 @@ def to_dict(self) -> Dict[str, Any]: return field_dict - def to_multipart(self) -> Dict[str, Any]: + def to_multipart(self) -> dict[str, Any]: a = self.a if isinstance(self.a, Unset) else (None, str(self.a).encode(), "text/plain") - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = (None, str(prop).encode(), "text/plain") @@ -43,7 +43,7 @@ def to_multipart(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() a = d.pop("a", UNSET) @@ -55,7 +55,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return post_bodies_multiple_files_body @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/post_bodies_multiple_json_body.py b/end_to_end_tests/golden-record/my_test_api_client/models/post_bodies_multiple_json_body.py index 88e5ec6f9..f4e7ffaa6 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/post_bodies_multiple_json_body.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/post_bodies_multiple_json_body.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,12 +16,12 @@ class PostBodiesMultipleJsonBody: """ a: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a = self.a - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if a is not UNSET: @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() a = d.pop("a", UNSET) @@ -42,7 +42,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return post_bodies_multiple_json_body @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/post_form_data_inline_body.py b/end_to_end_tests/golden-record/my_test_api_client/models/post_form_data_inline_body.py index 08a7bbc3a..07c3b2648 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/post_form_data_inline_body.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/post_form_data_inline_body.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +18,14 @@ class PostFormDataInlineBody: a_required_field: str an_optional_field: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a_required_field = self.a_required_field an_optional_field = self.an_optional_field - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -38,7 +38,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() a_required_field = d.pop("a_required_field") @@ -53,7 +53,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return post_form_data_inline_body @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_body.py b/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_body.py index ed2f8efa1..100e84dc9 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_body.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_body.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +18,14 @@ class PostNamingPropertyConflictWithImportBody: field: Union[Unset, str] = UNSET define: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: field = self.field define = self.define - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if field is not UNSET: @@ -36,7 +36,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() field = d.pop("Field", UNSET) @@ -51,7 +51,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return post_naming_property_conflict_with_import_body @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_response_200.py b/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_response_200.py index 9bdd79a02..91c550749 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_response_200.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_response_200.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +18,14 @@ class PostNamingPropertyConflictWithImportResponse200: field: Union[Unset, str] = UNSET define: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: field = self.field define = self.define - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if field is not UNSET: @@ -36,7 +36,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() field = d.pop("Field", UNSET) @@ -51,7 +51,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return post_naming_property_conflict_with_import_response_200 @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200.py b/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200.py index 3c07edb03..51f6dade2 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,20 +20,20 @@ class PostResponsesUnionsSimpleBeforeComplexResponse200: """ a: Union["PostResponsesUnionsSimpleBeforeComplexResponse200A", str] - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: from ..models.post_responses_unions_simple_before_complex_response_200a import ( PostResponsesUnionsSimpleBeforeComplexResponse200A, ) - a: Union[Dict[str, Any], str] + a: Union[dict[str, Any], str] if isinstance(self.a, PostResponsesUnionsSimpleBeforeComplexResponse200A): a = self.a.to_dict() else: a = self.a - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -44,7 +44,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.post_responses_unions_simple_before_complex_response_200a import ( PostResponsesUnionsSimpleBeforeComplexResponse200A, ) @@ -72,7 +72,7 @@ def _parse_a(data: object) -> Union["PostResponsesUnionsSimpleBeforeComplexRespo return post_responses_unions_simple_before_complex_response_200 @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200a.py b/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200a.py index a59c0962a..be97429f5 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200a.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200a.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -10,16 +10,16 @@ class PostResponsesUnionsSimpleBeforeComplexResponse200A: """ """ - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - field_dict: Dict[str, Any] = {} + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() post_responses_unions_simple_before_complex_response_200a = cls() @@ -27,7 +27,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return post_responses_unions_simple_before_complex_response_200a @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_body.py b/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_body.py index 8c1843b41..721011eed 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_body.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_body.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define @@ -16,10 +16,10 @@ class TestInlineObjectsBody: a_property: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a_property = self.a_property - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update({}) if a_property is not UNSET: field_dict["a_property"] = a_property @@ -27,7 +27,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() a_property = d.pop("a_property", UNSET) diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_response_200.py b/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_response_200.py index 6a0ade77f..2cf353587 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_response_200.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_response_200.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define @@ -16,10 +16,10 @@ class TestInlineObjectsResponse200: a_property: Union[Unset, str] = UNSET - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a_property = self.a_property - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update({}) if a_property is not UNSET: field_dict["a_property"] = a_property @@ -27,7 +27,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() a_property = d.pop("a_property", UNSET) diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/validation_error.py b/end_to_end_tests/golden-record/my_test_api_client/models/validation_error.py index 6ff5d4790..112808e62 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/validation_error.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/validation_error.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define @@ -9,46 +9,46 @@ class ValidationError: """ Attributes: - loc (List[str]): + loc (list[str]): msg (str): - type (str): + type_ (str): """ - loc: List[str] + loc: list[str] msg: str - type: str + type_: str - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: loc = self.loc msg = self.msg - type = self.type + type_ = self.type_ - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update( { "loc": loc, "msg": msg, - "type": type, + "type": type_, } ) return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() - loc = cast(List[str], d.pop("loc")) + loc = cast(list[str], d.pop("loc")) msg = d.pop("msg") - type = d.pop("type") + type_ = d.pop("type") validation_error = cls( loc=loc, msg=msg, - type=type, + type_=type_, ) return validation_error 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 21fac106f..b9ed58b8a 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,7 +1,8 @@ """Contains some shared types for properties""" +from collections.abc import MutableMapping from http import HTTPStatus -from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar +from typing import BinaryIO, Generic, Literal, Optional, TypeVar from attrs import define @@ -13,7 +14,7 @@ def __bool__(self) -> Literal[False]: UNSET: Unset = Unset() -FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]] +FileJsonType = tuple[Optional[str], BinaryIO, Optional[str]] @define @@ -42,4 +43,4 @@ class Response(Generic[T]): parsed: Optional[T] -__all__ = ["File", "Response", "FileJsonType", "Unset", "UNSET"] +__all__ = ["UNSET", "File", "FileJsonType", "Response", "Unset"] diff --git a/end_to_end_tests/golden-record/pyproject.toml b/end_to_end_tests/golden-record/pyproject.toml index 526beacf6..feca06dbd 100644 --- a/end_to_end_tests/golden-record/pyproject.toml +++ b/end_to_end_tests/golden-record/pyproject.toml @@ -11,9 +11,9 @@ include = ["CHANGELOG.md", "my_test_api_client/py.typed"] [tool.poetry.dependencies] -python = "^3.8" -httpx = ">=0.20.0,<0.28.0" -attrs = ">=21.3.0" +python = "^3.9" +httpx = ">=0.20.0,<0.29.0" +attrs = ">=22.2.0" python-dateutil = "^2.8.0" [build-system] diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/enums/bool_enum_tests_bool_enum_post.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/enums/bool_enum_tests_bool_enum_post.py index 851cdf385..52385855c 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/enums/bool_enum_tests_bool_enum_post.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/enums/bool_enum_tests_bool_enum_post.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -11,14 +11,14 @@ def _get_kwargs( *, bool_enum: bool, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} params["bool_enum"] = bool_enum params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/enum/bool", "params": params, diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/enums/int_enum_tests_int_enum_post.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/enums/int_enum_tests_int_enum_post.py index 5f9f7f8e5..af4c4ca22 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/enums/int_enum_tests_int_enum_post.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/enums/int_enum_tests_int_enum_post.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -12,15 +12,15 @@ def _get_kwargs( *, int_enum: AnIntEnum, -) -> Dict[str, Any]: - params: Dict[str, Any] = {} +) -> dict[str, Any]: + params: dict[str, Any] = {} json_int_enum: int = int_enum params["int_enum"] = json_int_enum params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/enum/int", "params": params, diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/tests/get_user_list.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/tests/get_user_list.py index ab60a4610..00bc801d9 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/tests/get_user_list.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/tests/get_user_list.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any, Optional, Union import httpx @@ -17,20 +17,20 @@ def _get_kwargs( *, - an_enum_value: List[AnEnum], - an_enum_value_with_null: List[Union[AnEnumWithNull, None]], - an_enum_value_with_only_null: List[None], + an_enum_value: list[AnEnum], + an_enum_value_with_null: list[Union[AnEnumWithNull, None]], + an_enum_value_with_only_null: list[None], int_enum_header: Union[Unset, GetUserListIntEnumHeader] = UNSET, string_enum_header: Union[Unset, GetUserListStringEnumHeader] = UNSET, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} if not isinstance(int_enum_header, Unset): headers["Int-Enum-Header"] = str(int_enum_header) if not isinstance(string_enum_header, Unset): headers["String-Enum-Header"] = str(string_enum_header) - params: Dict[str, Any] = {} + params: dict[str, Any] = {} json_an_enum_value = [] for an_enum_value_item_data in an_enum_value: @@ -56,7 +56,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "get", "url": "/tests/", "params": params, @@ -68,7 +68,7 @@ def _get_kwargs( def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[List["AModel"]]: +) -> Optional[list["AModel"]]: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -86,7 +86,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[List["AModel"]]: +) -> Response[list["AModel"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -98,20 +98,20 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], - an_enum_value: List[AnEnum], - an_enum_value_with_null: List[Union[AnEnumWithNull, None]], - an_enum_value_with_only_null: List[None], + an_enum_value: list[AnEnum], + an_enum_value_with_null: list[Union[AnEnumWithNull, None]], + an_enum_value_with_only_null: list[None], int_enum_header: Union[Unset, GetUserListIntEnumHeader] = UNSET, string_enum_header: Union[Unset, GetUserListStringEnumHeader] = UNSET, -) -> Response[List["AModel"]]: +) -> Response[list["AModel"]]: """Get List Get a list of things Args: - an_enum_value (List[AnEnum]): - an_enum_value_with_null (List[Union[AnEnumWithNull, None]]): - an_enum_value_with_only_null (List[None]): + an_enum_value (list[AnEnum]): + an_enum_value_with_null (list[Union[AnEnumWithNull, None]]): + an_enum_value_with_only_null (list[None]): int_enum_header (Union[Unset, GetUserListIntEnumHeader]): string_enum_header (Union[Unset, GetUserListStringEnumHeader]): @@ -120,7 +120,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['AModel']] + Response[list['AModel']] """ kwargs = _get_kwargs( @@ -141,20 +141,20 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], - an_enum_value: List[AnEnum], - an_enum_value_with_null: List[Union[AnEnumWithNull, None]], - an_enum_value_with_only_null: List[None], + an_enum_value: list[AnEnum], + an_enum_value_with_null: list[Union[AnEnumWithNull, None]], + an_enum_value_with_only_null: list[None], int_enum_header: Union[Unset, GetUserListIntEnumHeader] = UNSET, string_enum_header: Union[Unset, GetUserListStringEnumHeader] = UNSET, -) -> Optional[List["AModel"]]: +) -> Optional[list["AModel"]]: """Get List Get a list of things Args: - an_enum_value (List[AnEnum]): - an_enum_value_with_null (List[Union[AnEnumWithNull, None]]): - an_enum_value_with_only_null (List[None]): + an_enum_value (list[AnEnum]): + an_enum_value_with_null (list[Union[AnEnumWithNull, None]]): + an_enum_value_with_only_null (list[None]): int_enum_header (Union[Unset, GetUserListIntEnumHeader]): string_enum_header (Union[Unset, GetUserListStringEnumHeader]): @@ -163,7 +163,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['AModel'] + list['AModel'] """ return sync_detailed( @@ -179,20 +179,20 @@ def sync( async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], - an_enum_value: List[AnEnum], - an_enum_value_with_null: List[Union[AnEnumWithNull, None]], - an_enum_value_with_only_null: List[None], + an_enum_value: list[AnEnum], + an_enum_value_with_null: list[Union[AnEnumWithNull, None]], + an_enum_value_with_only_null: list[None], int_enum_header: Union[Unset, GetUserListIntEnumHeader] = UNSET, string_enum_header: Union[Unset, GetUserListStringEnumHeader] = UNSET, -) -> Response[List["AModel"]]: +) -> Response[list["AModel"]]: """Get List Get a list of things Args: - an_enum_value (List[AnEnum]): - an_enum_value_with_null (List[Union[AnEnumWithNull, None]]): - an_enum_value_with_only_null (List[None]): + an_enum_value (list[AnEnum]): + an_enum_value_with_null (list[Union[AnEnumWithNull, None]]): + an_enum_value_with_only_null (list[None]): int_enum_header (Union[Unset, GetUserListIntEnumHeader]): string_enum_header (Union[Unset, GetUserListStringEnumHeader]): @@ -201,7 +201,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['AModel']] + Response[list['AModel']] """ kwargs = _get_kwargs( @@ -220,20 +220,20 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], - an_enum_value: List[AnEnum], - an_enum_value_with_null: List[Union[AnEnumWithNull, None]], - an_enum_value_with_only_null: List[None], + an_enum_value: list[AnEnum], + an_enum_value_with_null: list[Union[AnEnumWithNull, None]], + an_enum_value_with_only_null: list[None], int_enum_header: Union[Unset, GetUserListIntEnumHeader] = UNSET, string_enum_header: Union[Unset, GetUserListStringEnumHeader] = UNSET, -) -> Optional[List["AModel"]]: +) -> Optional[list["AModel"]]: """Get List Get a list of things Args: - an_enum_value (List[AnEnum]): - an_enum_value_with_null (List[Union[AnEnumWithNull, None]]): - an_enum_value_with_only_null (List[None]): + an_enum_value (list[AnEnum]): + an_enum_value_with_null (list[Union[AnEnumWithNull, None]]): + an_enum_value_with_only_null (list[None]): int_enum_header (Union[Unset, GetUserListIntEnumHeader]): string_enum_header (Union[Unset, GetUserListStringEnumHeader]): @@ -242,7 +242,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['AModel'] + list['AModel'] """ return ( diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/tests/post_user_list.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/tests/post_user_list.py index 3cbdeddf8..82df1a8f8 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/tests/post_user_list.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/api/tests/post_user_list.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any, Optional, Union import httpx @@ -13,10 +13,10 @@ def _get_kwargs( *, body: PostUserListBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/tests/", } @@ -31,7 +31,7 @@ def _get_kwargs( def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[List["AModel"]]: +) -> Optional[list["AModel"]]: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -49,7 +49,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[List["AModel"]]: +) -> Response[list["AModel"]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -62,7 +62,7 @@ def sync_detailed( *, client: Union[AuthenticatedClient, Client], body: PostUserListBody, -) -> Response[List["AModel"]]: +) -> Response[list["AModel"]]: """Post List Post a list of things @@ -75,7 +75,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['AModel']] + Response[list['AModel']] """ kwargs = _get_kwargs( @@ -93,7 +93,7 @@ def sync( *, client: Union[AuthenticatedClient, Client], body: PostUserListBody, -) -> Optional[List["AModel"]]: +) -> Optional[list["AModel"]]: """Post List Post a list of things @@ -106,7 +106,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['AModel'] + list['AModel'] """ return sync_detailed( @@ -119,7 +119,7 @@ async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], body: PostUserListBody, -) -> Response[List["AModel"]]: +) -> Response[list["AModel"]]: """Post List Post a list of things @@ -132,7 +132,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[List['AModel']] + Response[list['AModel']] """ kwargs = _get_kwargs( @@ -148,7 +148,7 @@ async def asyncio( *, client: Union[AuthenticatedClient, Client], body: PostUserListBody, -) -> Optional[List["AModel"]]: +) -> Optional[list["AModel"]]: """Post List Post a list of things @@ -161,7 +161,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - List['AModel'] + list['AModel'] """ return ( diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/client.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/client.py index 0f6d15e84..e80446f10 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/client.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/client.py @@ -1,5 +1,5 @@ import ssl -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx from attrs import define, evolve, field @@ -36,16 +36,16 @@ class Client: raise_on_unexpected_status: bool = field(default=False, kw_only=True) _base_url: str = field(alias="base_url") - _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") _client: Optional[httpx.Client] = field(default=None, init=False) _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) - def with_headers(self, headers: Dict[str, str]) -> "Client": + def with_headers(self, headers: dict[str, str]) -> "Client": """Get a new client matching this one with additional headers""" if self._client is not None: self._client.headers.update(headers) @@ -53,7 +53,7 @@ def with_headers(self, headers: Dict[str, str]) -> "Client": self._async_client.headers.update(headers) return evolve(self, headers={**self._headers, **headers}) - def with_cookies(self, cookies: Dict[str, str]) -> "Client": + def with_cookies(self, cookies: dict[str, str]) -> "Client": """Get a new client matching this one with additional cookies""" if self._client is not None: self._client.cookies.update(cookies) @@ -166,12 +166,12 @@ class AuthenticatedClient: raise_on_unexpected_status: bool = field(default=False, kw_only=True) _base_url: str = field(alias="base_url") - _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") _client: Optional[httpx.Client] = field(default=None, init=False) _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) @@ -179,7 +179,7 @@ class AuthenticatedClient: prefix: str = "Bearer" auth_header_name: str = "Authorization" - def with_headers(self, headers: Dict[str, str]) -> "AuthenticatedClient": + def with_headers(self, headers: dict[str, str]) -> "AuthenticatedClient": """Get a new client matching this one with additional headers""" if self._client is not None: self._client.headers.update(headers) @@ -187,7 +187,7 @@ def with_headers(self, headers: Dict[str, str]) -> "AuthenticatedClient": self._async_client.headers.update(headers) return evolve(self, headers={**self._headers, **headers}) - def with_cookies(self, cookies: Dict[str, str]) -> "AuthenticatedClient": + def with_cookies(self, cookies: dict[str, str]) -> "AuthenticatedClient": """Get a new client matching this one with additional cookies""" if self._client is not None: self._client.cookies.update(cookies) diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/a_model.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/a_model.py index e05fdaa6d..7050c1a3c 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/a_model.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/a_model.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define @@ -19,16 +19,16 @@ class AModel: an_allof_enum_with_overridden_default (AnAllOfEnum): Default: 'overridden_default'. any_value (Union[Unset, Any]): an_optional_allof_enum (Union[Unset, AnAllOfEnum]): - nested_list_of_enums (Union[Unset, List[List[DifferentEnum]]]): + nested_list_of_enums (Union[Unset, list[list[DifferentEnum]]]): """ an_enum_value: AnEnum an_allof_enum_with_overridden_default: AnAllOfEnum = "overridden_default" any_value: Union[Unset, Any] = UNSET an_optional_allof_enum: Union[Unset, AnAllOfEnum] = UNSET - nested_list_of_enums: Union[Unset, List[List[DifferentEnum]]] = UNSET + nested_list_of_enums: Union[Unset, list[list[DifferentEnum]]] = UNSET - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: an_enum_value: str = self.an_enum_value an_allof_enum_with_overridden_default: str = self.an_allof_enum_with_overridden_default @@ -39,7 +39,7 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.an_optional_allof_enum, Unset): an_optional_allof_enum = self.an_optional_allof_enum - nested_list_of_enums: Union[Unset, List[List[str]]] = UNSET + nested_list_of_enums: Union[Unset, list[list[str]]] = UNSET if not isinstance(self.nested_list_of_enums, Unset): nested_list_of_enums = [] for nested_list_of_enums_item_data in self.nested_list_of_enums: @@ -50,7 +50,7 @@ def to_dict(self) -> Dict[str, Any]: nested_list_of_enums.append(nested_list_of_enums_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update( { "an_enum_value": an_enum_value, @@ -67,7 +67,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() an_enum_value = check_an_enum(d.pop("an_enum_value")) diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_all_of_enum.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_all_of_enum.py index e238b15a9..3455e04d0 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_all_of_enum.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_all_of_enum.py @@ -1,8 +1,8 @@ -from typing import Literal, Set, cast +from typing import Literal, cast AnAllOfEnum = Literal["a_default", "bar", "foo", "overridden_default"] -AN_ALL_OF_ENUM_VALUES: Set[AnAllOfEnum] = { +AN_ALL_OF_ENUM_VALUES: set[AnAllOfEnum] = { "a_default", "bar", "foo", diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_enum.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_enum.py index 608b22fc4..27b5c45f9 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_enum.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_enum.py @@ -1,8 +1,8 @@ -from typing import Literal, Set, cast +from typing import Literal, cast AnEnum = Literal["FIRST_VALUE", "SECOND_VALUE"] -AN_ENUM_VALUES: Set[AnEnum] = { +AN_ENUM_VALUES: set[AnEnum] = { "FIRST_VALUE", "SECOND_VALUE", } diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_enum_with_null.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_enum_with_null.py index 1519ec27c..4203876de 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_enum_with_null.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_enum_with_null.py @@ -1,8 +1,8 @@ -from typing import Literal, Set, cast +from typing import Literal, cast AnEnumWithNull = Literal["FIRST_VALUE", "SECOND_VALUE"] -AN_ENUM_WITH_NULL_VALUES: Set[AnEnumWithNull] = { +AN_ENUM_WITH_NULL_VALUES: set[AnEnumWithNull] = { "FIRST_VALUE", "SECOND_VALUE", } diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_int_enum.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_int_enum.py index a3c1108ea..9d0abd942 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_int_enum.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/an_int_enum.py @@ -1,8 +1,8 @@ -from typing import Literal, Set, cast +from typing import Literal, cast AnIntEnum = Literal[-1, 1, 2] -AN_INT_ENUM_VALUES: Set[AnIntEnum] = { +AN_INT_ENUM_VALUES: set[AnIntEnum] = { -1, 1, 2, diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/different_enum.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/different_enum.py index d40045c50..e672a9821 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/different_enum.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/different_enum.py @@ -1,8 +1,8 @@ -from typing import Literal, Set, cast +from typing import Literal, cast DifferentEnum = Literal["DIFFERENT", "OTHER"] -DIFFERENT_ENUM_VALUES: Set[DifferentEnum] = { +DIFFERENT_ENUM_VALUES: set[DifferentEnum] = { "DIFFERENT", "OTHER", } diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/get_user_list_int_enum_header.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/get_user_list_int_enum_header.py index 50e8114ae..845d6c2a0 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/get_user_list_int_enum_header.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/get_user_list_int_enum_header.py @@ -1,8 +1,8 @@ -from typing import Literal, Set, cast +from typing import Literal, cast GetUserListIntEnumHeader = Literal[1, 2, 3] -GET_USER_LIST_INT_ENUM_HEADER_VALUES: Set[GetUserListIntEnumHeader] = { +GET_USER_LIST_INT_ENUM_HEADER_VALUES: set[GetUserListIntEnumHeader] = { 1, 2, 3, diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/get_user_list_string_enum_header.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/get_user_list_string_enum_header.py index d73cea6a6..55dbbad62 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/get_user_list_string_enum_header.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/get_user_list_string_enum_header.py @@ -1,8 +1,8 @@ -from typing import Literal, Set, cast +from typing import Literal, cast GetUserListStringEnumHeader = Literal["one", "three", "two"] -GET_USER_LIST_STRING_ENUM_HEADER_VALUES: Set[GetUserListStringEnumHeader] = { +GET_USER_LIST_STRING_ENUM_HEADER_VALUES: set[GetUserListStringEnumHeader] = { "one", "three", "two", diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/post_user_list_body.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/post_user_list_body.py index db13a1e93..6af995f66 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/post_user_list_body.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/models/post_user_list_body.py @@ -1,5 +1,5 @@ import json -from typing import Any, Dict, List, Tuple, Type, TypeVar, Union, cast +from typing import Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,31 +17,31 @@ class PostUserListBody: """ Attributes: - an_enum_value (Union[Unset, List[AnEnum]]): - an_enum_value_with_null (Union[Unset, List[Union[AnEnumWithNull, None]]]): - an_enum_value_with_only_null (Union[Unset, List[None]]): + an_enum_value (Union[Unset, list[AnEnum]]): + an_enum_value_with_null (Union[Unset, list[Union[AnEnumWithNull, None]]]): + an_enum_value_with_only_null (Union[Unset, list[None]]): an_allof_enum_with_overridden_default (Union[Unset, AnAllOfEnum]): Default: 'overridden_default'. an_optional_allof_enum (Union[Unset, AnAllOfEnum]): - nested_list_of_enums (Union[Unset, List[List[DifferentEnum]]]): + nested_list_of_enums (Union[Unset, list[list[DifferentEnum]]]): """ - an_enum_value: Union[Unset, List[AnEnum]] = UNSET - an_enum_value_with_null: Union[Unset, List[Union[AnEnumWithNull, None]]] = UNSET - an_enum_value_with_only_null: Union[Unset, List[None]] = UNSET + an_enum_value: Union[Unset, list[AnEnum]] = UNSET + an_enum_value_with_null: Union[Unset, list[Union[AnEnumWithNull, None]]] = UNSET + an_enum_value_with_only_null: Union[Unset, list[None]] = UNSET an_allof_enum_with_overridden_default: Union[Unset, AnAllOfEnum] = "overridden_default" an_optional_allof_enum: Union[Unset, AnAllOfEnum] = UNSET - nested_list_of_enums: Union[Unset, List[List[DifferentEnum]]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + nested_list_of_enums: Union[Unset, list[list[DifferentEnum]]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - an_enum_value: Union[Unset, List[str]] = UNSET + def to_dict(self) -> dict[str, Any]: + an_enum_value: Union[Unset, list[str]] = UNSET if not isinstance(self.an_enum_value, Unset): an_enum_value = [] for an_enum_value_item_data in self.an_enum_value: an_enum_value_item: str = an_enum_value_item_data an_enum_value.append(an_enum_value_item) - an_enum_value_with_null: Union[Unset, List[Union[None, str]]] = UNSET + an_enum_value_with_null: Union[Unset, list[Union[None, str]]] = UNSET if not isinstance(self.an_enum_value_with_null, Unset): an_enum_value_with_null = [] for an_enum_value_with_null_item_data in self.an_enum_value_with_null: @@ -52,7 +52,7 @@ def to_dict(self) -> Dict[str, Any]: an_enum_value_with_null_item = an_enum_value_with_null_item_data an_enum_value_with_null.append(an_enum_value_with_null_item) - an_enum_value_with_only_null: Union[Unset, List[None]] = UNSET + an_enum_value_with_only_null: Union[Unset, list[None]] = UNSET if not isinstance(self.an_enum_value_with_only_null, Unset): an_enum_value_with_only_null = self.an_enum_value_with_only_null @@ -64,7 +64,7 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.an_optional_allof_enum, Unset): an_optional_allof_enum = self.an_optional_allof_enum - nested_list_of_enums: Union[Unset, List[List[str]]] = UNSET + nested_list_of_enums: Union[Unset, list[list[str]]] = UNSET if not isinstance(self.nested_list_of_enums, Unset): nested_list_of_enums = [] for nested_list_of_enums_item_data in self.nested_list_of_enums: @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: nested_list_of_enums.append(nested_list_of_enums_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if an_enum_value is not UNSET: @@ -93,8 +93,8 @@ def to_dict(self) -> Dict[str, Any]: return field_dict - def to_multipart(self) -> Dict[str, Any]: - an_enum_value: Union[Unset, Tuple[None, bytes, str]] = UNSET + def to_multipart(self) -> dict[str, Any]: + an_enum_value: Union[Unset, tuple[None, bytes, str]] = UNSET if not isinstance(self.an_enum_value, Unset): _temp_an_enum_value = [] for an_enum_value_item_data in self.an_enum_value: @@ -102,7 +102,7 @@ def to_multipart(self) -> Dict[str, Any]: _temp_an_enum_value.append(an_enum_value_item) an_enum_value = (None, json.dumps(_temp_an_enum_value).encode(), "application/json") - an_enum_value_with_null: Union[Unset, Tuple[None, bytes, str]] = UNSET + an_enum_value_with_null: Union[Unset, tuple[None, bytes, str]] = UNSET if not isinstance(self.an_enum_value_with_null, Unset): _temp_an_enum_value_with_null = [] for an_enum_value_with_null_item_data in self.an_enum_value_with_null: @@ -114,7 +114,7 @@ def to_multipart(self) -> Dict[str, Any]: _temp_an_enum_value_with_null.append(an_enum_value_with_null_item) an_enum_value_with_null = (None, json.dumps(_temp_an_enum_value_with_null).encode(), "application/json") - an_enum_value_with_only_null: Union[Unset, Tuple[None, bytes, str]] = UNSET + an_enum_value_with_only_null: Union[Unset, tuple[None, bytes, str]] = UNSET if not isinstance(self.an_enum_value_with_only_null, Unset): _temp_an_enum_value_with_only_null = self.an_enum_value_with_only_null an_enum_value_with_only_null = ( @@ -123,7 +123,7 @@ def to_multipart(self) -> Dict[str, Any]: "application/json", ) - an_allof_enum_with_overridden_default: Union[Unset, Tuple[None, bytes, str]] = UNSET + an_allof_enum_with_overridden_default: Union[Unset, tuple[None, bytes, str]] = UNSET if not isinstance(self.an_allof_enum_with_overridden_default, Unset): an_allof_enum_with_overridden_default = ( None, @@ -131,11 +131,11 @@ def to_multipart(self) -> Dict[str, Any]: "text/plain", ) - an_optional_allof_enum: Union[Unset, Tuple[None, bytes, str]] = UNSET + an_optional_allof_enum: Union[Unset, tuple[None, bytes, str]] = UNSET if not isinstance(self.an_optional_allof_enum, Unset): an_optional_allof_enum = (None, str(self.an_optional_allof_enum).encode(), "text/plain") - nested_list_of_enums: Union[Unset, Tuple[None, bytes, str]] = UNSET + nested_list_of_enums: Union[Unset, tuple[None, bytes, str]] = UNSET if not isinstance(self.nested_list_of_enums, Unset): _temp_nested_list_of_enums = [] for nested_list_of_enums_item_data in self.nested_list_of_enums: @@ -147,7 +147,7 @@ def to_multipart(self) -> Dict[str, Any]: _temp_nested_list_of_enums.append(nested_list_of_enums_item) nested_list_of_enums = (None, json.dumps(_temp_nested_list_of_enums).encode(), "application/json") - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = (None, str(prop).encode(), "text/plain") @@ -168,7 +168,7 @@ def to_multipart(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() an_enum_value = [] _an_enum_value = d.pop("an_enum_value", UNSET) @@ -198,7 +198,7 @@ def _parse_an_enum_value_with_null_item(data: object) -> Union[AnEnumWithNull, N an_enum_value_with_null.append(an_enum_value_with_null_item) - an_enum_value_with_only_null = cast(List[None], d.pop("an_enum_value_with_only_null", UNSET)) + an_enum_value_with_only_null = cast(list[None], d.pop("an_enum_value_with_only_null", UNSET)) _an_allof_enum_with_overridden_default = d.pop("an_allof_enum_with_overridden_default", UNSET) an_allof_enum_with_overridden_default: Union[Unset, AnAllOfEnum] @@ -239,7 +239,7 @@ def _parse_an_enum_value_with_null_item(data: object) -> Union[AnEnumWithNull, N return post_user_list_body @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/types.py b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/types.py index 21fac106f..b9ed58b8a 100644 --- a/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/types.py +++ b/end_to_end_tests/literal-enums-golden-record/my_enum_api_client/types.py @@ -1,7 +1,8 @@ """Contains some shared types for properties""" +from collections.abc import MutableMapping from http import HTTPStatus -from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar +from typing import BinaryIO, Generic, Literal, Optional, TypeVar from attrs import define @@ -13,7 +14,7 @@ def __bool__(self) -> Literal[False]: UNSET: Unset = Unset() -FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]] +FileJsonType = tuple[Optional[str], BinaryIO, Optional[str]] @define @@ -42,4 +43,4 @@ class Response(Generic[T]): parsed: Optional[T] -__all__ = ["File", "Response", "FileJsonType", "Unset", "UNSET"] +__all__ = ["UNSET", "File", "FileJsonType", "Response", "Unset"] diff --git a/end_to_end_tests/literal-enums-golden-record/pyproject.toml b/end_to_end_tests/literal-enums-golden-record/pyproject.toml index d32c2d72c..2c4d6b4e3 100644 --- a/end_to_end_tests/literal-enums-golden-record/pyproject.toml +++ b/end_to_end_tests/literal-enums-golden-record/pyproject.toml @@ -11,9 +11,9 @@ include = ["CHANGELOG.md", "my_enum_api_client/py.typed"] [tool.poetry.dependencies] -python = "^3.8" -httpx = ">=0.20.0,<0.28.0" -attrs = ">=21.3.0" +python = "^3.9" +httpx = ">=0.20.0,<0.29.0" +attrs = ">=22.2.0" python-dateutil = "^2.8.0" [build-system] diff --git a/end_to_end_tests/metadata_snapshots/pdm.pyproject.toml b/end_to_end_tests/metadata_snapshots/pdm.pyproject.toml index fddcea97f..c1f8a2a2b 100644 --- a/end_to_end_tests/metadata_snapshots/pdm.pyproject.toml +++ b/end_to_end_tests/metadata_snapshots/pdm.pyproject.toml @@ -4,10 +4,10 @@ version = "0.1.0" description = "A client library for accessing Test 3.1 Features" authors = [] readme = "README.md" -requires-python = ">=3.8,<4.0" +requires-python = ">=3.9,<4.0" dependencies = [ - "httpx>=0.20.0,<0.28.0", - "attrs>=21.3.0", + "httpx>=0.20.0,<0.29.0", + "attrs>=22.2.0", "python-dateutil>=2.8.0", ] diff --git a/end_to_end_tests/metadata_snapshots/poetry.pyproject.toml b/end_to_end_tests/metadata_snapshots/poetry.pyproject.toml index f9a1becf8..2e8cd6c04 100644 --- a/end_to_end_tests/metadata_snapshots/poetry.pyproject.toml +++ b/end_to_end_tests/metadata_snapshots/poetry.pyproject.toml @@ -11,9 +11,9 @@ include = ["CHANGELOG.md", "test_3_1_features_client/py.typed"] [tool.poetry.dependencies] -python = "^3.8" -httpx = ">=0.20.0,<0.28.0" -attrs = ">=21.3.0" +python = "^3.9" +httpx = ">=0.20.0,<0.29.0" +attrs = ">=22.2.0" python-dateutil = "^2.8.0" [build-system] diff --git a/end_to_end_tests/metadata_snapshots/setup.py b/end_to_end_tests/metadata_snapshots/setup.py index 6350b8c4c..6c7a58b97 100644 --- a/end_to_end_tests/metadata_snapshots/setup.py +++ b/end_to_end_tests/metadata_snapshots/setup.py @@ -12,7 +12,7 @@ long_description=long_description, long_description_content_type="text/markdown", packages=find_packages(), - python_requires=">=3.8, <4", - install_requires=["httpx >= 0.20.0, < 0.28.0", "attrs >= 21.3.0", "python-dateutil >= 2.8.0, < 3"], + python_requires=">=3.9, <4", + install_requires=["httpx >= 0.20.0, < 0.29.0", "attrs >= 22.2.0", "python-dateutil >= 2.8.0, < 3"], package_data={"test_3_1_features_client": ["py.typed"]}, ) diff --git a/end_to_end_tests/test-3-1-golden-record/pyproject.toml b/end_to_end_tests/test-3-1-golden-record/pyproject.toml index f9a1becf8..2e8cd6c04 100644 --- a/end_to_end_tests/test-3-1-golden-record/pyproject.toml +++ b/end_to_end_tests/test-3-1-golden-record/pyproject.toml @@ -11,9 +11,9 @@ include = ["CHANGELOG.md", "test_3_1_features_client/py.typed"] [tool.poetry.dependencies] -python = "^3.8" -httpx = ">=0.20.0,<0.28.0" -attrs = ">=21.3.0" +python = "^3.9" +httpx = ">=0.20.0,<0.29.0" +attrs = ">=22.2.0" python-dateutil = "^2.8.0" [build-system] diff --git a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/api/const/post_const_path.py b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/api/const/post_const_path.py index 9a8181e26..0d05b8189 100644 --- a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/api/const/post_const_path.py +++ b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/api/const/post_const_path.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Literal, Optional, Union, cast +from typing import Any, Literal, Optional, Union, cast import httpx @@ -15,10 +15,10 @@ def _get_kwargs( body: PostConstPathBody, required_query: Literal["this always goes in the query"], optional_query: Union[Literal["this sometimes goes in the query"], Unset] = UNSET, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - params: Dict[str, Any] = {} + params: dict[str, Any] = {} params["required query"] = required_query @@ -26,7 +26,7 @@ def _get_kwargs( params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": f"/const/{path}", "params": params, diff --git a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/api/prefix_items/post_prefix_items.py b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/api/prefix_items/post_prefix_items.py index 03afbcb0e..f12d53f18 100644 --- a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/api/prefix_items/post_prefix_items.py +++ b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/api/prefix_items/post_prefix_items.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast +from typing import Any, Optional, Union, cast import httpx @@ -12,10 +12,10 @@ def _get_kwargs( *, body: PostPrefixItemsBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/prefixItems", } diff --git a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/client.py b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/client.py index 0f6d15e84..e80446f10 100644 --- a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/client.py +++ b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/client.py @@ -1,5 +1,5 @@ import ssl -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx from attrs import define, evolve, field @@ -36,16 +36,16 @@ class Client: raise_on_unexpected_status: bool = field(default=False, kw_only=True) _base_url: str = field(alias="base_url") - _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") _client: Optional[httpx.Client] = field(default=None, init=False) _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) - def with_headers(self, headers: Dict[str, str]) -> "Client": + def with_headers(self, headers: dict[str, str]) -> "Client": """Get a new client matching this one with additional headers""" if self._client is not None: self._client.headers.update(headers) @@ -53,7 +53,7 @@ def with_headers(self, headers: Dict[str, str]) -> "Client": self._async_client.headers.update(headers) return evolve(self, headers={**self._headers, **headers}) - def with_cookies(self, cookies: Dict[str, str]) -> "Client": + def with_cookies(self, cookies: dict[str, str]) -> "Client": """Get a new client matching this one with additional cookies""" if self._client is not None: self._client.cookies.update(cookies) @@ -166,12 +166,12 @@ class AuthenticatedClient: raise_on_unexpected_status: bool = field(default=False, kw_only=True) _base_url: str = field(alias="base_url") - _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") _client: Optional[httpx.Client] = field(default=None, init=False) _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) @@ -179,7 +179,7 @@ class AuthenticatedClient: prefix: str = "Bearer" auth_header_name: str = "Authorization" - def with_headers(self, headers: Dict[str, str]) -> "AuthenticatedClient": + def with_headers(self, headers: dict[str, str]) -> "AuthenticatedClient": """Get a new client matching this one with additional headers""" if self._client is not None: self._client.headers.update(headers) @@ -187,7 +187,7 @@ def with_headers(self, headers: Dict[str, str]) -> "AuthenticatedClient": self._async_client.headers.update(headers) return evolve(self, headers={**self._headers, **headers}) - def with_cookies(self, cookies: Dict[str, str]) -> "AuthenticatedClient": + def with_cookies(self, cookies: dict[str, str]) -> "AuthenticatedClient": """Get a new client matching this one with additional cookies""" if self._client is not None: self._client.cookies.update(cookies) diff --git a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/models/post_const_path_body.py b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/models/post_const_path_body.py index 9ac2f9102..15734903c 100644 --- a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/models/post_const_path_body.py +++ b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/models/post_const_path_body.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Literal, Type, TypeVar, Union, cast +from typing import Any, Literal, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,9 +20,9 @@ class PostConstPathBody: required: Literal["this always goes in the body"] nullable: Union[Literal["this or null goes in the body"], None] optional: Union[Literal["this sometimes goes in the body"], Unset] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: required = self.required nullable: Union[Literal["this or null goes in the body"], None] @@ -30,7 +30,7 @@ def to_dict(self) -> Dict[str, Any]: optional = self.optional - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -44,7 +44,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() required = cast(Literal["this always goes in the body"], d.pop("required")) if required != "this always goes in the body": @@ -77,7 +77,7 @@ def _parse_nullable(data: object) -> Union[Literal["this or null goes in the bod return post_const_path_body @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/models/post_prefix_items_body.py b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/models/post_prefix_items_body.py index f3edd841d..a578b3091 100644 --- a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/models/post_prefix_items_body.py +++ b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/models/post_prefix_items_body.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Literal, Type, TypeVar, Union, cast +from typing import Any, Literal, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,16 +12,16 @@ class PostPrefixItemsBody: """ Attributes: - prefix_items_and_items (Union[Unset, List[Union[Literal['prefix'], float, str]]]): - prefix_items_only (Union[Unset, List[Union[float, str]]]): + prefix_items_and_items (Union[Unset, list[Union[Literal['prefix'], float, str]]]): + prefix_items_only (Union[Unset, list[Union[float, str]]]): """ - prefix_items_and_items: Union[Unset, List[Union[Literal["prefix"], float, str]]] = UNSET - prefix_items_only: Union[Unset, List[Union[float, str]]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + prefix_items_and_items: Union[Unset, list[Union[Literal["prefix"], float, str]]] = UNSET + prefix_items_only: Union[Unset, list[Union[float, str]]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - prefix_items_and_items: Union[Unset, List[Union[Literal["prefix"], float, str]]] = UNSET + def to_dict(self) -> dict[str, Any]: + prefix_items_and_items: Union[Unset, list[Union[Literal["prefix"], float, str]]] = UNSET if not isinstance(self.prefix_items_and_items, Unset): prefix_items_and_items = [] for prefix_items_and_items_item_data in self.prefix_items_and_items: @@ -29,7 +29,7 @@ def to_dict(self) -> Dict[str, Any]: prefix_items_and_items_item = prefix_items_and_items_item_data prefix_items_and_items.append(prefix_items_and_items_item) - prefix_items_only: Union[Unset, List[Union[float, str]]] = UNSET + prefix_items_only: Union[Unset, list[Union[float, str]]] = UNSET if not isinstance(self.prefix_items_only, Unset): prefix_items_only = [] for prefix_items_only_item_data in self.prefix_items_only: @@ -37,7 +37,7 @@ def to_dict(self) -> Dict[str, Any]: prefix_items_only_item = prefix_items_only_item_data prefix_items_only.append(prefix_items_only_item) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if prefix_items_and_items is not UNSET: @@ -48,7 +48,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() prefix_items_and_items = [] _prefix_items_and_items = d.pop("prefixItemsAndItems", UNSET) @@ -87,7 +87,7 @@ def _parse_prefix_items_only_item(data: object) -> Union[float, str]: return post_prefix_items_body @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/types.py b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/types.py index 21fac106f..b9ed58b8a 100644 --- a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/types.py +++ b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/types.py @@ -1,7 +1,8 @@ """Contains some shared types for properties""" +from collections.abc import MutableMapping from http import HTTPStatus -from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar +from typing import BinaryIO, Generic, Literal, Optional, TypeVar from attrs import define @@ -13,7 +14,7 @@ def __bool__(self) -> Literal[False]: UNSET: Unset = Unset() -FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]] +FileJsonType = tuple[Optional[str], BinaryIO, Optional[str]] @define @@ -42,4 +43,4 @@ class Response(Generic[T]): parsed: Optional[T] -__all__ = ["File", "Response", "FileJsonType", "Unset", "UNSET"] +__all__ = ["UNSET", "File", "FileJsonType", "Response", "Unset"] diff --git a/end_to_end_tests/test_custom_templates/api_init.py.jinja b/end_to_end_tests/test_custom_templates/api_init.py.jinja index 0c5720bf2..78e473147 100644 --- a/end_to_end_tests/test_custom_templates/api_init.py.jinja +++ b/end_to_end_tests/test_custom_templates/api_init.py.jinja @@ -1,6 +1,5 @@ """ Contains methods for accessing the API """ -from typing import Type {% for tag in endpoint_collections_by_tag.keys() %} from .{{ tag }} import {{ class_name(tag) }}Endpoints {% endfor %} @@ -8,6 +7,6 @@ from .{{ tag }} import {{ class_name(tag) }}Endpoints class {{ class_name(package_name) }}Api: {% for tag in endpoint_collections_by_tag.keys() %} @classmethod - def {{ tag }}(cls) -> Type[{{ class_name(tag) }}Endpoints]: + def {{ tag }}(cls) -> type[{{ class_name(tag) }}Endpoints]: return {{ class_name(tag) }}Endpoints {% endfor %} diff --git a/end_to_end_tests/test_end_to_end.py b/end_to_end_tests/test_end_to_end.py index 7f5582fa4..ae86a2514 100644 --- a/end_to_end_tests/test_end_to_end.py +++ b/end_to_end_tests/test_end_to_end.py @@ -1,7 +1,7 @@ import shutil from filecmp import cmpfiles, dircmp from pathlib import Path -from typing import Dict, List, Optional, Set +from typing import Optional import pytest from click.testing import Result @@ -16,9 +16,9 @@ def _compare_directories( record: Path, test_subject: Path, - expected_differences: Dict[Path, str], - expected_missing: Optional[Set[str]] = None, - ignore: List[str] = None, + expected_differences: Optional[dict[Path, str]] = None, + expected_missing: Optional[set[str]] = None, + ignore: list[str] = None, depth=0, ): """ @@ -81,11 +81,11 @@ def _compare_directories( def run_e2e_test( openapi_document: str, - extra_args: List[str], - expected_differences: Optional[Dict[Path, str]] = None, + extra_args: list[str], + expected_differences: Optional[dict[Path, str]] = None, golden_record_path: str = "golden-record", output_path: str = "my-test-api-client", - expected_missing: Optional[Set[str]] = None, + expected_missing: Optional[set[str]] = None, specify_output_path_explicitly: bool = True, ) -> Result: with generate_client(openapi_document, extra_args, output_path, specify_output_path_explicitly=specify_output_path_explicitly) as g: diff --git a/integration-tests/.gitignore b/integration-tests/.gitignore index ed29cb977..79a2c3d73 100644 --- a/integration-tests/.gitignore +++ b/integration-tests/.gitignore @@ -20,4 +20,4 @@ dmypy.json .idea/ /coverage.xml -/.coverage \ No newline at end of file +/.coverage diff --git a/integration-tests/integration_tests/api/body/post_body_multipart.py b/integration-tests/integration_tests/api/body/post_body_multipart.py index bfef23f2e..13c943ad7 100644 --- a/integration-tests/integration_tests/api/body/post_body_multipart.py +++ b/integration-tests/integration_tests/api/body/post_body_multipart.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -14,10 +14,10 @@ def _get_kwargs( *, body: PostBodyMultipartBody, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/body/multipart", } diff --git a/integration-tests/integration_tests/api/parameters/post_parameters_header.py b/integration-tests/integration_tests/api/parameters/post_parameters_header.py index 90858f9bb..0981585cc 100644 --- a/integration-tests/integration_tests/api/parameters/post_parameters_header.py +++ b/integration-tests/integration_tests/api/parameters/post_parameters_header.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx @@ -16,8 +16,8 @@ def _get_kwargs( string_header: str, number_header: float, integer_header: int, -) -> Dict[str, Any]: - headers: Dict[str, Any] = {} +) -> dict[str, Any]: + headers: dict[str, Any] = {} headers["Boolean-Header"] = "true" if boolean_header else "false" headers["String-Header"] = string_header @@ -26,7 +26,7 @@ def _get_kwargs( headers["Integer-Header"] = str(integer_header) - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "post", "url": "/parameters/header", } diff --git a/integration-tests/integration_tests/client.py b/integration-tests/integration_tests/client.py index 0f6d15e84..e80446f10 100644 --- a/integration-tests/integration_tests/client.py +++ b/integration-tests/integration_tests/client.py @@ -1,5 +1,5 @@ import ssl -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union import httpx from attrs import define, evolve, field @@ -36,16 +36,16 @@ class Client: raise_on_unexpected_status: bool = field(default=False, kw_only=True) _base_url: str = field(alias="base_url") - _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") _client: Optional[httpx.Client] = field(default=None, init=False) _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) - def with_headers(self, headers: Dict[str, str]) -> "Client": + def with_headers(self, headers: dict[str, str]) -> "Client": """Get a new client matching this one with additional headers""" if self._client is not None: self._client.headers.update(headers) @@ -53,7 +53,7 @@ def with_headers(self, headers: Dict[str, str]) -> "Client": self._async_client.headers.update(headers) return evolve(self, headers={**self._headers, **headers}) - def with_cookies(self, cookies: Dict[str, str]) -> "Client": + def with_cookies(self, cookies: dict[str, str]) -> "Client": """Get a new client matching this one with additional cookies""" if self._client is not None: self._client.cookies.update(cookies) @@ -166,12 +166,12 @@ class AuthenticatedClient: raise_on_unexpected_status: bool = field(default=False, kw_only=True) _base_url: str = field(alias="base_url") - _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") _client: Optional[httpx.Client] = field(default=None, init=False) _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) @@ -179,7 +179,7 @@ class AuthenticatedClient: prefix: str = "Bearer" auth_header_name: str = "Authorization" - def with_headers(self, headers: Dict[str, str]) -> "AuthenticatedClient": + def with_headers(self, headers: dict[str, str]) -> "AuthenticatedClient": """Get a new client matching this one with additional headers""" if self._client is not None: self._client.headers.update(headers) @@ -187,7 +187,7 @@ def with_headers(self, headers: Dict[str, str]) -> "AuthenticatedClient": self._async_client.headers.update(headers) return evolve(self, headers={**self._headers, **headers}) - def with_cookies(self, cookies: Dict[str, str]) -> "AuthenticatedClient": + def with_cookies(self, cookies: dict[str, str]) -> "AuthenticatedClient": """Get a new client matching this one with additional cookies""" if self._client is not None: self._client.cookies.update(cookies) diff --git a/integration-tests/integration_tests/models/post_body_multipart_body.py b/integration-tests/integration_tests/models/post_body_multipart_body.py index f0272a34e..13174200d 100644 --- a/integration-tests/integration_tests/models/post_body_multipart_body.py +++ b/integration-tests/integration_tests/models/post_body_multipart_body.py @@ -1,5 +1,5 @@ from io import BytesIO -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,16 +22,16 @@ class PostBodyMultipartBody: a_string: str file: File description: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a_string = self.a_string file = self.file.to_tuple() description = self.description - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -44,7 +44,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict - def to_multipart(self) -> Dict[str, Any]: + def to_multipart(self) -> dict[str, Any]: a_string = (None, str(self.a_string).encode(), "text/plain") file = self.file.to_tuple() @@ -55,7 +55,7 @@ def to_multipart(self) -> Dict[str, Any]: else (None, str(self.description).encode(), "text/plain") ) - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = (None, str(prop).encode(), "text/plain") @@ -71,7 +71,7 @@ def to_multipart(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() a_string = d.pop("a_string") @@ -89,7 +89,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return post_body_multipart_body @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/integration-tests/integration_tests/models/post_body_multipart_response_200.py b/integration-tests/integration_tests/models/post_body_multipart_response_200.py index 79359ec41..65f38c082 100644 --- a/integration-tests/integration_tests/models/post_body_multipart_response_200.py +++ b/integration-tests/integration_tests/models/post_body_multipart_response_200.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,9 +22,9 @@ class PostBodyMultipartResponse200: description: str file_name: str file_content_type: str - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: a_string = self.a_string file_data = self.file_data @@ -35,7 +35,7 @@ def to_dict(self) -> Dict[str, Any]: file_content_type = self.file_content_type - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -50,7 +50,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() a_string = d.pop("a_string") @@ -74,7 +74,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return post_body_multipart_response_200 @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/integration-tests/integration_tests/models/post_parameters_header_response_200.py b/integration-tests/integration_tests/models/post_parameters_header_response_200.py index 03e688ba1..ff44f5644 100644 --- a/integration-tests/integration_tests/models/post_parameters_header_response_200.py +++ b/integration-tests/integration_tests/models/post_parameters_header_response_200.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,9 +20,9 @@ class PostParametersHeaderResponse200: string: str number: float integer: int - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: boolean = self.boolean string = self.string @@ -31,7 +31,7 @@ def to_dict(self) -> Dict[str, Any]: integer = self.integer - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { @@ -45,7 +45,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() boolean = d.pop("boolean") @@ -66,7 +66,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return post_parameters_header_response_200 @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/integration-tests/integration_tests/models/problem.py b/integration-tests/integration_tests/models/problem.py index bde5b6d37..f61f42b5d 100644 --- a/integration-tests/integration_tests/models/problem.py +++ b/integration-tests/integration_tests/models/problem.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,14 +18,14 @@ class Problem: parameter_name: Union[Unset, str] = UNSET description: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: parameter_name = self.parameter_name description = self.description - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if parameter_name is not UNSET: @@ -36,7 +36,7 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: d = src_dict.copy() parameter_name = d.pop("parameter_name", UNSET) @@ -51,7 +51,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return problem @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/integration-tests/integration_tests/models/public_error.py b/integration-tests/integration_tests/models/public_error.py index 993bd8ad3..5e9d53c26 100644 --- a/integration-tests/integration_tests/models/public_error.py +++ b/integration-tests/integration_tests/models/public_error.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -16,39 +16,39 @@ class PublicError: """ Attributes: - errors (Union[Unset, List[str]]): - extra_parameters (Union[Unset, List[str]]): - invalid_parameters (Union[Unset, List['Problem']]): - missing_parameters (Union[Unset, List[str]]): + errors (Union[Unset, list[str]]): + extra_parameters (Union[Unset, list[str]]): + invalid_parameters (Union[Unset, list['Problem']]): + missing_parameters (Union[Unset, list[str]]): """ - errors: Union[Unset, List[str]] = UNSET - extra_parameters: Union[Unset, List[str]] = UNSET - invalid_parameters: Union[Unset, List["Problem"]] = UNSET - missing_parameters: Union[Unset, List[str]] = UNSET - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + errors: Union[Unset, list[str]] = UNSET + extra_parameters: Union[Unset, list[str]] = UNSET + invalid_parameters: Union[Unset, list["Problem"]] = UNSET + missing_parameters: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - errors: Union[Unset, List[str]] = UNSET + def to_dict(self) -> dict[str, Any]: + errors: Union[Unset, list[str]] = UNSET if not isinstance(self.errors, Unset): errors = self.errors - extra_parameters: Union[Unset, List[str]] = UNSET + extra_parameters: Union[Unset, list[str]] = UNSET if not isinstance(self.extra_parameters, Unset): extra_parameters = self.extra_parameters - invalid_parameters: Union[Unset, List[Dict[str, Any]]] = UNSET + invalid_parameters: Union[Unset, list[dict[str, Any]]] = UNSET if not isinstance(self.invalid_parameters, Unset): invalid_parameters = [] for invalid_parameters_item_data in self.invalid_parameters: invalid_parameters_item = invalid_parameters_item_data.to_dict() invalid_parameters.append(invalid_parameters_item) - missing_parameters: Union[Unset, List[str]] = UNSET + missing_parameters: Union[Unset, list[str]] = UNSET if not isinstance(self.missing_parameters, Unset): missing_parameters = self.missing_parameters - field_dict: Dict[str, Any] = {} + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if errors is not UNSET: @@ -63,13 +63,13 @@ def to_dict(self) -> Dict[str, Any]: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: from ..models.problem import Problem d = src_dict.copy() - errors = cast(List[str], d.pop("errors", UNSET)) + errors = cast(list[str], d.pop("errors", UNSET)) - extra_parameters = cast(List[str], d.pop("extra_parameters", UNSET)) + extra_parameters = cast(list[str], d.pop("extra_parameters", UNSET)) invalid_parameters = [] _invalid_parameters = d.pop("invalid_parameters", UNSET) @@ -78,7 +78,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: invalid_parameters.append(invalid_parameters_item) - missing_parameters = cast(List[str], d.pop("missing_parameters", UNSET)) + missing_parameters = cast(list[str], d.pop("missing_parameters", UNSET)) public_error = cls( errors=errors, @@ -91,7 +91,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: return public_error @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: diff --git a/integration-tests/integration_tests/py.typed b/integration-tests/integration_tests/py.typed new file mode 100644 index 000000000..1aad32711 --- /dev/null +++ b/integration-tests/integration_tests/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561 \ No newline at end of file diff --git a/integration-tests/integration_tests/types.py b/integration-tests/integration_tests/types.py index 21fac106f..b9ed58b8a 100644 --- a/integration-tests/integration_tests/types.py +++ b/integration-tests/integration_tests/types.py @@ -1,7 +1,8 @@ """Contains some shared types for properties""" +from collections.abc import MutableMapping from http import HTTPStatus -from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar +from typing import BinaryIO, Generic, Literal, Optional, TypeVar from attrs import define @@ -13,7 +14,7 @@ def __bool__(self) -> Literal[False]: UNSET: Unset = Unset() -FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]] +FileJsonType = tuple[Optional[str], BinaryIO, Optional[str]] @define @@ -42,4 +43,4 @@ class Response(Generic[T]): parsed: Optional[T] -__all__ = ["File", "Response", "FileJsonType", "Unset", "UNSET"] +__all__ = ["UNSET", "File", "FileJsonType", "Response", "Unset"] diff --git a/integration-tests/pdm.lock b/integration-tests/pdm.lock index 6ace3d70a..a854a988f 100644 --- a/integration-tests/pdm.lock +++ b/integration-tests/pdm.lock @@ -5,51 +5,48 @@ groups = ["default", "dev"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:23d53455c7fb390a7c1f417cee321de488e65815e6420ae5968172119fac835d" +content_hash = "sha256:a575c5fc1f04f52530c52becbcc2f40498a54612d0eeeaddf6701fe5336986ac" [[metadata.targets]] -requires_python = "~=3.8" +requires_python = "~=3.9" [[package]] name = "anyio" -version = "4.5.2" -requires_python = ">=3.8" +version = "4.7.0" +requires_python = ">=3.9" summary = "High level compatibility layer for multiple asynchronous event loop implementations" groups = ["default"] dependencies = [ "exceptiongroup>=1.0.2; python_version < \"3.11\"", "idna>=2.8", "sniffio>=1.1", - "typing-extensions>=4.1; python_version < \"3.11\"", + "typing-extensions>=4.5; python_version < \"3.13\"", ] files = [ - {file = "anyio-4.5.2-py3-none-any.whl", hash = "sha256:c011ee36bc1e8ba40e5a81cb9df91925c218fe9b778554e0b56a21e1b5d4716f"}, - {file = "anyio-4.5.2.tar.gz", hash = "sha256:23009af4ed04ce05991845451e11ef02fc7c5ed29179ac9a420e5ad0ac7ddc5b"}, + {file = "anyio-4.7.0-py3-none-any.whl", hash = "sha256:ea60c3723ab42ba6fff7e8ccb0488c898ec538ff4df1f1d5e642c3601d07e352"}, + {file = "anyio-4.7.0.tar.gz", hash = "sha256:2f834749c602966b7d456a7567cafcb309f96482b5081d14ac93ccd457f9dd48"}, ] [[package]] name = "attrs" -version = "24.2.0" -requires_python = ">=3.7" +version = "24.3.0" +requires_python = ">=3.8" summary = "Classes Without Boilerplate" groups = ["default"] -dependencies = [ - "importlib-metadata; python_version < \"3.8\"", -] files = [ - {file = "attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2"}, - {file = "attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"}, + {file = "attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308"}, + {file = "attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff"}, ] [[package]] name = "certifi" -version = "2024.8.30" +version = "2024.12.14" requires_python = ">=3.6" summary = "Python package for providing Mozilla's CA Bundle." groups = ["default"] files = [ - {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, - {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, + {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, + {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, ] [[package]] @@ -92,7 +89,7 @@ files = [ [[package]] name = "httpcore" -version = "1.0.6" +version = "1.0.7" requires_python = ">=3.8" summary = "A minimal low-level HTTP client." groups = ["default"] @@ -101,13 +98,13 @@ dependencies = [ "h11<0.15,>=0.13", ] files = [ - {file = "httpcore-1.0.6-py3-none-any.whl", hash = "sha256:27b59625743b85577a8c0e10e55b50b5368a4f2cfe8cc7bcfa9cf00829c2682f"}, - {file = "httpcore-1.0.6.tar.gz", hash = "sha256:73f6dbd6eb8c21bbf7ef8efad555481853f5f6acdeaff1edb0694289269ee17f"}, + {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"}, + {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"}, ] [[package]] name = "httpx" -version = "0.27.2" +version = "0.28.1" requires_python = ">=3.8" summary = "The next generation HTTP client." groups = ["default"] @@ -116,11 +113,10 @@ dependencies = [ "certifi", "httpcore==1.*", "idna", - "sniffio", ] files = [ - {file = "httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0"}, - {file = "httpx-0.27.2.tar.gz", hash = "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2"}, + {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, + {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, ] [[package]] @@ -147,7 +143,7 @@ files = [ [[package]] name = "mypy" -version = "1.12.1" +version = "1.14.0" requires_python = ">=3.8" summary = "Optional static typing for Python" groups = ["dev"] @@ -157,38 +153,33 @@ dependencies = [ "typing-extensions>=4.6.0", ] files = [ - {file = "mypy-1.12.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3d7d4371829184e22fda4015278fbfdef0327a4b955a483012bd2d423a788801"}, - {file = "mypy-1.12.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f59f1dfbf497d473201356966e353ef09d4daec48caeacc0254db8ef633a28a5"}, - {file = "mypy-1.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b947097fae68004b8328c55161ac9db7d3566abfef72d9d41b47a021c2fba6b1"}, - {file = "mypy-1.12.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:96af62050971c5241afb4701c15189ea9507db89ad07794a4ee7b4e092dc0627"}, - {file = "mypy-1.12.1-cp310-cp310-win_amd64.whl", hash = "sha256:d90da248f4c2dba6c44ddcfea94bb361e491962f05f41990ff24dbd09969ce20"}, - {file = "mypy-1.12.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1230048fec1380faf240be6385e709c8570604d2d27ec6ca7e573e3bc09c3735"}, - {file = "mypy-1.12.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:02dcfe270c6ea13338210908f8cadc8d31af0f04cee8ca996438fe6a97b4ec66"}, - {file = "mypy-1.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a5a437c9102a6a252d9e3a63edc191a3aed5f2fcb786d614722ee3f4472e33f6"}, - {file = "mypy-1.12.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:186e0c8346efc027ee1f9acf5ca734425fc4f7dc2b60144f0fbe27cc19dc7931"}, - {file = "mypy-1.12.1-cp311-cp311-win_amd64.whl", hash = "sha256:673ba1140a478b50e6d265c03391702fa11a5c5aff3f54d69a62a48da32cb811"}, - {file = "mypy-1.12.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:9fb83a7be97c498176fb7486cafbb81decccaef1ac339d837c377b0ce3743a7f"}, - {file = "mypy-1.12.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:389e307e333879c571029d5b93932cf838b811d3f5395ed1ad05086b52148fb0"}, - {file = "mypy-1.12.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:94b2048a95a21f7a9ebc9fbd075a4fcd310410d078aa0228dbbad7f71335e042"}, - {file = "mypy-1.12.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ee5932370ccf7ebf83f79d1c157a5929d7ea36313027b0d70a488493dc1b179"}, - {file = "mypy-1.12.1-cp312-cp312-win_amd64.whl", hash = "sha256:19bf51f87a295e7ab2894f1d8167622b063492d754e69c3c2fed6563268cb42a"}, - {file = "mypy-1.12.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d34167d43613ffb1d6c6cdc0cc043bb106cac0aa5d6a4171f77ab92a3c758bcc"}, - {file = "mypy-1.12.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:427878aa54f2e2c5d8db31fa9010c599ed9f994b3b49e64ae9cd9990c40bd635"}, - {file = "mypy-1.12.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5fcde63ea2c9f69d6be859a1e6dd35955e87fa81de95bc240143cf00de1f7f81"}, - {file = "mypy-1.12.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:d54d840f6c052929f4a3d2aab2066af0f45a020b085fe0e40d4583db52aab4e4"}, - {file = "mypy-1.12.1-cp313-cp313-win_amd64.whl", hash = "sha256:20db6eb1ca3d1de8ece00033b12f793f1ea9da767334b7e8c626a4872090cf02"}, - {file = "mypy-1.12.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b16fe09f9c741d85a2e3b14a5257a27a4f4886c171d562bc5a5e90d8591906b8"}, - {file = "mypy-1.12.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0dcc1e843d58f444fce19da4cce5bd35c282d4bde232acdeca8279523087088a"}, - {file = "mypy-1.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e10ba7de5c616e44ad21005fa13450cd0de7caaa303a626147d45307492e4f2d"}, - {file = "mypy-1.12.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:0e6fe449223fa59fbee351db32283838a8fee8059e0028e9e6494a03802b4004"}, - {file = "mypy-1.12.1-cp38-cp38-win_amd64.whl", hash = "sha256:dc6e2a2195a290a7fd5bac3e60b586d77fc88e986eba7feced8b778c373f9afe"}, - {file = "mypy-1.12.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:de5b2a8988b4e1269a98beaf0e7cc71b510d050dce80c343b53b4955fff45f19"}, - {file = "mypy-1.12.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:843826966f1d65925e8b50d2b483065c51fc16dc5d72647e0236aae51dc8d77e"}, - {file = "mypy-1.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9fe20f89da41a95e14c34b1ddb09c80262edcc295ad891f22cc4b60013e8f78d"}, - {file = "mypy-1.12.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8135ffec02121a75f75dc97c81af7c14aa4ae0dda277132cfcd6abcd21551bfd"}, - {file = "mypy-1.12.1-cp39-cp39-win_amd64.whl", hash = "sha256:a7b76fa83260824300cc4834a3ab93180db19876bce59af921467fd03e692810"}, - {file = "mypy-1.12.1-py3-none-any.whl", hash = "sha256:ce561a09e3bb9863ab77edf29ae3a50e65685ad74bba1431278185b7e5d5486e"}, - {file = "mypy-1.12.1.tar.gz", hash = "sha256:f5b3936f7a6d0e8280c9bdef94c7ce4847f5cdfc258fbb2c29a8c1711e8bb96d"}, + {file = "mypy-1.14.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e971c1c667007f9f2b397ffa80fa8e1e0adccff336e5e77e74cb5f22868bee87"}, + {file = "mypy-1.14.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e86aaeaa3221a278c66d3d673b297232947d873773d61ca3ee0e28b2ff027179"}, + {file = "mypy-1.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1628c5c3ce823d296e41e2984ff88c5861499041cb416a8809615d0c1f41740e"}, + {file = "mypy-1.14.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7fadb29b77fc14a0dd81304ed73c828c3e5cde0016c7e668a86a3e0dfc9f3af3"}, + {file = "mypy-1.14.0-cp310-cp310-win_amd64.whl", hash = "sha256:3fa76988dc760da377c1e5069200a50d9eaaccf34f4ea18428a3337034ab5a44"}, + {file = "mypy-1.14.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6e73c8a154eed31db3445fe28f63ad2d97b674b911c00191416cf7f6459fd49a"}, + {file = "mypy-1.14.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:273e70fcb2e38c5405a188425aa60b984ffdcef65d6c746ea5813024b68c73dc"}, + {file = "mypy-1.14.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1daca283d732943731a6a9f20fdbcaa927f160bc51602b1d4ef880a6fb252015"}, + {file = "mypy-1.14.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7e68047bedb04c1c25bba9901ea46ff60d5eaac2d71b1f2161f33107e2b368eb"}, + {file = "mypy-1.14.0-cp311-cp311-win_amd64.whl", hash = "sha256:7a52f26b9c9b1664a60d87675f3bae00b5c7f2806e0c2800545a32c325920bcc"}, + {file = "mypy-1.14.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d5326ab70a6db8e856d59ad4cb72741124950cbbf32e7b70e30166ba7bbf61dd"}, + {file = "mypy-1.14.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bf4ec4980bec1e0e24e5075f449d014011527ae0055884c7e3abc6a99cd2c7f1"}, + {file = "mypy-1.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:390dfb898239c25289495500f12fa73aa7f24a4c6d90ccdc165762462b998d63"}, + {file = "mypy-1.14.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7e026d55ddcd76e29e87865c08cbe2d0104e2b3153a523c529de584759379d3d"}, + {file = "mypy-1.14.0-cp312-cp312-win_amd64.whl", hash = "sha256:585ed36031d0b3ee362e5107ef449a8b5dfd4e9c90ccbe36414ee405ee6b32ba"}, + {file = "mypy-1.14.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9f6f4c0b27401d14c483c622bc5105eff3911634d576bbdf6695b9a7c1ba741"}, + {file = "mypy-1.14.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:56b2280cedcb312c7a79f5001ae5325582d0d339bce684e4a529069d0e7ca1e7"}, + {file = "mypy-1.14.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:342de51c48bab326bfc77ce056ba08c076d82ce4f5a86621f972ed39970f94d8"}, + {file = "mypy-1.14.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:00df23b42e533e02a6f0055e54de9a6ed491cd8b7ea738647364fd3a39ea7efc"}, + {file = "mypy-1.14.0-cp313-cp313-win_amd64.whl", hash = "sha256:e8c8387e5d9dff80e7daf961df357c80e694e942d9755f3ad77d69b0957b8e3f"}, + {file = "mypy-1.14.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:14117b9da3305b39860d0aa34b8f1ff74d209a368829a584eb77524389a9c13e"}, + {file = "mypy-1.14.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:af98c5a958f9c37404bd4eef2f920b94874507e146ed6ee559f185b8809c44cc"}, + {file = "mypy-1.14.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f0b343a1d3989547024377c2ba0dca9c74a2428ad6ed24283c213af8dbb0710b"}, + {file = "mypy-1.14.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:cdb5563c1726c85fb201be383168f8c866032db95e1095600806625b3a648cb7"}, + {file = "mypy-1.14.0-cp39-cp39-win_amd64.whl", hash = "sha256:74e925649c1ee0a79aa7448baf2668d81cc287dc5782cff6a04ee93f40fb8d3f"}, + {file = "mypy-1.14.0-py3-none-any.whl", hash = "sha256:2238d7f93fc4027ed1efc944507683df3ba406445a2b6c96e79666a045aadfab"}, + {file = "mypy-1.14.0.tar.gz", hash = "sha256:822dbd184d4a9804df5a7d5335a68cf7662930e70b8c1bc976645d1509f9a9d6"}, ] [[package]] @@ -204,13 +195,13 @@ files = [ [[package]] name = "packaging" -version = "24.1" +version = "24.2" requires_python = ">=3.8" summary = "Core utilities for Python packages" groups = ["dev"] files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] [[package]] @@ -226,7 +217,7 @@ files = [ [[package]] name = "pytest" -version = "8.3.3" +version = "8.3.4" requires_python = ">=3.8" summary = "pytest: simple powerful testing with Python" groups = ["dev"] @@ -239,22 +230,22 @@ dependencies = [ "tomli>=1; python_version < \"3.11\"", ] files = [ - {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, - {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, + {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, + {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, ] [[package]] name = "pytest-asyncio" -version = "0.24.0" -requires_python = ">=3.8" +version = "0.25.0" +requires_python = ">=3.9" summary = "Pytest support for asyncio" groups = ["dev"] dependencies = [ "pytest<9,>=8.2", ] files = [ - {file = "pytest_asyncio-0.24.0-py3-none-any.whl", hash = "sha256:a811296ed596b69bf0b6f3dc40f83bcaf341b155a269052d82efa2b25ac7037b"}, - {file = "pytest_asyncio-0.24.0.tar.gz", hash = "sha256:d081d828e576d85f875399194281e92bf8a68d60d72d1a2faf2feddb6c46b276"}, + {file = "pytest_asyncio-0.25.0-py3-none-any.whl", hash = "sha256:db5432d18eac6b7e28b46dcd9b69921b55c3b1086e85febfe04e70b18d9e81b3"}, + {file = "pytest_asyncio-0.25.0.tar.gz", hash = "sha256:8c0610303c9e0442a5db8604505fc0f545456ba1528824842b37b4a626cbf609"}, ] [[package]] @@ -273,13 +264,13 @@ files = [ [[package]] name = "six" -version = "1.16.0" -requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +version = "1.17.0" +requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" summary = "Python 2 and 3 compatibility utilities" groups = ["default"] files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, + {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, + {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, ] [[package]] @@ -295,14 +286,44 @@ files = [ [[package]] name = "tomli" -version = "2.0.2" +version = "2.2.1" requires_python = ">=3.8" summary = "A lil' TOML parser" groups = ["dev"] marker = "python_version < \"3.11\"" files = [ - {file = "tomli-2.0.2-py3-none-any.whl", hash = "sha256:2ebe24485c53d303f690b0ec092806a085f07af5a5aa1464f3931eec36caaa38"}, - {file = "tomli-2.0.2.tar.gz", hash = "sha256:d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed"}, + {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, + {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, + {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"}, + {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"}, + {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"}, + {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"}, + {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"}, + {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"}, + {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"}, + {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"}, + {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"}, + {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"}, + {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"}, + {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"}, + {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"}, + {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"}, + {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"}, + {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"}, + {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"}, + {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"}, + {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"}, + {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"}, + {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"}, + {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"}, + {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"}, + {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"}, + {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"}, + {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"}, + {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"}, + {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"}, + {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, + {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, ] [[package]] diff --git a/integration-tests/pyproject.toml b/integration-tests/pyproject.toml index 67b0d7f52..cbcff74c6 100644 --- a/integration-tests/pyproject.toml +++ b/integration-tests/pyproject.toml @@ -4,12 +4,12 @@ version = "0.0.1" description = "A client library for accessing OpenAPI Test Server" authors = [] readme = "README.md" +requires-python = ">=3.9,<4.0" dependencies = [ - "httpx>=0.20.0,<0.28.0", - "attrs>=21.3.0", + "httpx>=0.20.0,<0.29.0", + "attrs>=22.2.0", "python-dateutil>=2.8.0", ] -requires-python = ">=3.8,<4.0" [tool.pdm] distribution = true diff --git a/openapi_python_client/__init__.py b/openapi_python_client/__init__.py index df2f2cfd0..13ac6d7f4 100644 --- a/openapi_python_client/__init__.py +++ b/openapi_python_client/__init__.py @@ -4,10 +4,11 @@ import mimetypes import shutil import subprocess +from collections.abc import Sequence from importlib.metadata import version from pathlib import Path from subprocess import CalledProcessError -from typing import Any, Dict, List, Optional, Sequence, Union +from typing import Any, Optional, Union import httpcore import httpx @@ -106,19 +107,17 @@ def __init__( openapi=self.openapi, endpoint_collections_by_tag=self.openapi.endpoint_collections_by_tag, ) - self.errors: List[GeneratorError] = [] + self.errors: list[GeneratorError] = [] def build(self) -> Sequence[GeneratorError]: """Create the project from templates""" print(f"Generating {self.project_dir}") - if self.config.overwrite: - shutil.rmtree(self.project_dir, ignore_errors=True) - try: self.project_dir.mkdir() except FileExistsError: - return [GeneratorError(detail="Directory already exists. Delete it or use the --overwrite option.")] + if not self.config.overwrite: + return [GeneratorError(detail="Directory already exists. Delete it or use the --overwrite option.")] self._create_package() self._build_metadata() self._build_models() @@ -152,8 +151,8 @@ def _run_command(self, cmd: str) -> None: ) ) - def _get_errors(self) -> List[GeneratorError]: - errors: List[GeneratorError] = [] + def _get_errors(self) -> list[GeneratorError]: + errors: list[GeneratorError] = [] for collection in self.openapi.endpoint_collections_by_tag.values(): errors.extend(collection.parse_errors) errors.extend(self.openapi.errors) @@ -162,7 +161,7 @@ def _get_errors(self) -> List[GeneratorError]: def _create_package(self) -> None: if self.package_dir != self.project_dir: - self.package_dir.mkdir() + self.package_dir.mkdir(exist_ok=True) # Package __init__.py package_init = self.package_dir / "__init__.py" @@ -218,6 +217,7 @@ def _build_setup_py(self) -> None: def _build_models(self) -> None: # Generate models models_dir = self.package_dir / "models" + shutil.rmtree(models_dir, ignore_errors=True) models_dir.mkdir() models_init = models_dir / "__init__.py" imports = [] @@ -263,6 +263,7 @@ def _build_api(self) -> None: # Generate endpoints api_dir = self.package_dir / "api" + shutil.rmtree(api_dir, ignore_errors=True) api_dir.mkdir() api_init_path = api_dir / "__init__.py" api_init_template = self.env.get_template("api_init.py.jinja") @@ -330,7 +331,7 @@ def generate( return project.build() -def _load_yaml_or_json(data: bytes, content_type: Optional[str]) -> Union[Dict[str, Any], GeneratorError]: +def _load_yaml_or_json(data: bytes, content_type: Optional[str]) -> Union[dict[str, Any], GeneratorError]: if content_type == "application/json": try: return json.loads(data.decode()) @@ -344,7 +345,7 @@ def _load_yaml_or_json(data: bytes, content_type: Optional[str]) -> Union[Dict[s return GeneratorError(header=f"Invalid YAML from provided source: {err}") -def _get_document(*, source: Union[str, Path], timeout: int) -> Union[Dict[str, Any], GeneratorError]: +def _get_document(*, source: Union[str, Path], timeout: int) -> Union[dict[str, Any], GeneratorError]: yaml_bytes: bytes content_type: Optional[str] if isinstance(source, str): diff --git a/openapi_python_client/cli.py b/openapi_python_client/cli.py index e8fd50f9e..92d91f943 100644 --- a/openapi_python_client/cli.py +++ b/openapi_python_client/cli.py @@ -1,7 +1,8 @@ import codecs +from collections.abc import Sequence from pathlib import Path from pprint import pformat -from typing import Optional, Sequence, Union +from typing import Optional, Union import typer @@ -9,7 +10,7 @@ from openapi_python_client.config import Config, ConfigFile from openapi_python_client.parser.errors import ErrorLevel, GeneratorError, ParseError -app = typer.Typer() +app = typer.Typer(name="openapi-python-client") def _version_callback(value: bool) -> None: @@ -62,7 +63,7 @@ def _process_config( # noinspection PyUnusedLocal -@app.callback(name="openapi-python-client") +@app.callback() def cli( version: bool = typer.Option(False, "--version", callback=_version_callback, help="Print the version and exit"), ) -> None: diff --git a/openapi_python_client/config.py b/openapi_python_client/config.py index 6625bda1f..9cc002d12 100644 --- a/openapi_python_client/config.py +++ b/openapi_python_client/config.py @@ -2,7 +2,7 @@ import mimetypes from enum import Enum from pathlib import Path -from typing import Dict, List, Optional, Union +from typing import Optional, Union from attr import define from pydantic import BaseModel @@ -34,14 +34,15 @@ class ConfigFile(BaseModel): See https://github.com/openapi-generators/openapi-python-client#configuration """ - class_overrides: Optional[Dict[str, ClassOverride]] = None - content_type_overrides: Optional[Dict[str, str]] = None + class_overrides: Optional[dict[str, ClassOverride]] = None + content_type_overrides: Optional[dict[str, str]] = None project_name_override: Optional[str] = None package_name_override: Optional[str] = None package_version_override: Optional[str] = None use_path_prefixes_for_title_model_names: bool = True - post_hooks: Optional[List[str]] = None + post_hooks: Optional[list[str]] = None field_prefix: str = "field_" + generate_all_tags: bool = False http_timeout: int = 5 literal_enums: bool = False @@ -63,18 +64,19 @@ class Config: """Contains all the config values for the generator, from files, defaults, and CLI arguments.""" meta_type: MetaType - class_overrides: Dict[str, ClassOverride] + class_overrides: dict[str, ClassOverride] project_name_override: Optional[str] package_name_override: Optional[str] package_version_override: Optional[str] use_path_prefixes_for_title_model_names: bool - post_hooks: List[str] + post_hooks: list[str] field_prefix: str + generate_all_tags: bool http_timeout: int literal_enums: bool document_source: Union[Path, str] file_encoding: str - content_type_overrides: Dict[str, str] + content_type_overrides: dict[str, str] overwrite: bool output_path: Optional[Path] @@ -110,6 +112,7 @@ def from_sources( use_path_prefixes_for_title_model_names=config_file.use_path_prefixes_for_title_model_names, post_hooks=post_hooks, field_prefix=config_file.field_prefix, + generate_all_tags=config_file.generate_all_tags, http_timeout=config_file.http_timeout, literal_enums=config_file.literal_enums, document_source=document_source, diff --git a/openapi_python_client/parser/bodies.py b/openapi_python_client/parser/bodies.py index 4e672f702..7d0b12954 100644 --- a/openapi_python_client/parser/bodies.py +++ b/openapi_python_client/parser/bodies.py @@ -1,5 +1,5 @@ import sys -from typing import Dict, List, Tuple, Union +from typing import Union import attr @@ -45,10 +45,10 @@ def body_from_data( *, data: oai.Operation, schemas: Schemas, - request_bodies: Dict[str, Union[oai.RequestBody, oai.Reference]], + request_bodies: dict[str, Union[oai.RequestBody, oai.Reference]], config: Config, endpoint_name: str, -) -> Tuple[List[Union[Body, ParseError]], Schemas]: +) -> tuple[list[Union[Body, ParseError]], Schemas]: """Adds form or JSON body to Endpoint if included in data""" body = _resolve_reference(data.request_body, request_bodies) if isinstance(body, ParseError): @@ -56,7 +56,7 @@ def body_from_data( if body is None: return [], schemas - bodies: List[Union[Body, ParseError]] = [] + bodies: list[Union[Body, ParseError]] = [] body_content = body.content prefix_type_names = len(body_content) > 1 @@ -132,7 +132,7 @@ def body_from_data( def _resolve_reference( - body: Union[oai.RequestBody, oai.Reference, None], request_bodies: Dict[str, Union[oai.RequestBody, oai.Reference]] + body: Union[oai.RequestBody, oai.Reference, None], request_bodies: dict[str, Union[oai.RequestBody, oai.Reference]] ) -> Union[oai.RequestBody, ParseError, None]: if body is None: return None diff --git a/openapi_python_client/parser/errors.py b/openapi_python_client/parser/errors.py index 76a795b24..36322f0cf 100644 --- a/openapi_python_client/parser/errors.py +++ b/openapi_python_client/parser/errors.py @@ -2,7 +2,7 @@ from enum import Enum from typing import Optional -__all__ = ["ErrorLevel", "GeneratorError", "ParseError", "PropertyError", "ParameterError"] +__all__ = ["ErrorLevel", "GeneratorError", "ParameterError", "ParseError", "PropertyError"] from pydantic import BaseModel diff --git a/openapi_python_client/parser/openapi.py b/openapi_python_client/parser/openapi.py index 2b24b2d9c..e427cc18d 100644 --- a/openapi_python_client/parser/openapi.py +++ b/openapi_python_client/parser/openapi.py @@ -1,8 +1,9 @@ import re +from collections.abc import Iterator from copy import deepcopy from dataclasses import dataclass, field from http import HTTPStatus -from typing import Any, Dict, Iterator, List, Optional, Protocol, Set, Tuple, Union +from typing import Any, Optional, Protocol, Union from pydantic import ValidationError @@ -40,21 +41,21 @@ class EndpointCollection: """A bunch of endpoints grouped under a tag that will become a module""" tag: str - endpoints: List["Endpoint"] = field(default_factory=list) - parse_errors: List[ParseError] = field(default_factory=list) + endpoints: list["Endpoint"] = field(default_factory=list) + parse_errors: list[ParseError] = field(default_factory=list) @staticmethod def from_data( *, - data: Dict[str, oai.PathItem], + data: dict[str, oai.PathItem], schemas: Schemas, parameters: Parameters, - request_bodies: Dict[str, Union[oai.RequestBody, oai.Reference]], - responses: Dict[str, Union[oai.Response, oai.Reference]], + request_bodies: dict[str, Union[oai.RequestBody, oai.Reference]], + responses: dict[str, Union[oai.Response, oai.Reference]], config: Config, - ) -> Tuple[Dict[utils.PythonIdentifier, "EndpointCollection"], Schemas, Parameters]: + ) -> tuple[dict[utils.PythonIdentifier, "EndpointCollection"], Schemas, Parameters]: """Parse the openapi paths data to get EndpointCollections by tag""" - endpoints_by_tag: Dict[utils.PythonIdentifier, EndpointCollection] = {} + endpoints_by_tag: dict[utils.PythonIdentifier, EndpointCollection] = {} methods = ["get", "put", "post", "delete", "options", "head", "patch", "trace"] @@ -63,13 +64,18 @@ def from_data( operation: Optional[oai.Operation] = getattr(path_data, method) if operation is None: continue - tag = utils.PythonIdentifier(value=(operation.tags or ["default"])[0], prefix="tag") - collection = endpoints_by_tag.setdefault(tag, EndpointCollection(tag=tag)) + + tags = [utils.PythonIdentifier(value=tag, prefix="tag") for tag in operation.tags or ["default"]] + if not config.generate_all_tags: + tags = tags[:1] + + collections = [endpoints_by_tag.setdefault(tag, EndpointCollection(tag=tag)) for tag in tags] + endpoint, schemas, parameters = Endpoint.from_data( data=operation, path=path, method=method, - tag=tag, + tags=tags, schemas=schemas, parameters=parameters, request_bodies=request_bodies, @@ -88,15 +94,16 @@ def from_data( if not isinstance(endpoint, ParseError): endpoint = Endpoint.sort_parameters(endpoint=endpoint) if isinstance(endpoint, ParseError): - endpoint.header = ( - f"WARNING parsing {method.upper()} {path} within {tag}. Endpoint will not be generated." - ) - collection.parse_errors.append(endpoint) + endpoint.header = f"WARNING parsing {method.upper()} {path} within {'/'.join(tags)}. Endpoint will not be generated." + for collection in collections: + collection.parse_errors.append(endpoint) continue for error in endpoint.errors: - error.header = f"WARNING parsing {method.upper()} {path} within {tag}." - collection.parse_errors.append(error) - collection.endpoints.append(endpoint) + error.header = f"WARNING parsing {method.upper()} {path} within {'/'.join(tags)}." + for collection in collections: + collection.parse_errors.append(error) + for collection in collections: + collection.endpoints.append(endpoint) return endpoints_by_tag, schemas, parameters @@ -119,7 +126,7 @@ class RequestBodyParser(Protocol): def __call__( self, *, body: oai.RequestBody, schemas: Schemas, parent_name: str, config: Config - ) -> Tuple[Union[Property, PropertyError, None], Schemas]: ... # pragma: no cover + ) -> tuple[Union[Property, PropertyError, None], Schemas]: ... # pragma: no cover @dataclass @@ -133,16 +140,16 @@ class Endpoint: description: Optional[str] name: str requires_security: bool - tag: str + tags: list[PythonIdentifier] summary: Optional[str] = "" - relative_imports: Set[str] = field(default_factory=set) - query_parameters: List[Property] = field(default_factory=list) - path_parameters: List[Property] = field(default_factory=list) - header_parameters: List[Property] = field(default_factory=list) - cookie_parameters: List[Property] = field(default_factory=list) - responses: List[Response] = field(default_factory=list) - bodies: List[Body] = field(default_factory=list) - errors: List[ParseError] = field(default_factory=list) + relative_imports: set[str] = field(default_factory=set) + query_parameters: list[Property] = field(default_factory=list) + path_parameters: list[Property] = field(default_factory=list) + header_parameters: list[Property] = field(default_factory=list) + cookie_parameters: list[Property] = field(default_factory=list) + responses: list[Response] = field(default_factory=list) + bodies: list[Body] = field(default_factory=list) + errors: list[ParseError] = field(default_factory=list) @staticmethod def _add_responses( @@ -150,9 +157,9 @@ def _add_responses( endpoint: "Endpoint", data: oai.Responses, schemas: Schemas, - responses: Dict[str, Union[oai.Response, oai.Reference]], + responses: dict[str, Union[oai.Response, oai.Reference]], config: Config, - ) -> Tuple["Endpoint", Schemas]: + ) -> tuple["Endpoint", Schemas]: endpoint = deepcopy(endpoint) for code, response_data in data.items(): status_code: HTTPStatus @@ -205,7 +212,7 @@ def add_parameters( schemas: Schemas, parameters: Parameters, config: Config, - ) -> Tuple[Union["Endpoint", ParseError], Schemas, Parameters]: + ) -> tuple[Union["Endpoint", ParseError], Schemas, Parameters]: """Process the defined `parameters` for an Endpoint. Any existing parameters will be ignored, so earlier instances of a parameter take precedence. PathItem @@ -234,8 +241,8 @@ def add_parameters( endpoint = deepcopy(endpoint) - unique_parameters: Set[Tuple[str, oai.ParameterLocation]] = set() - parameters_by_location: Dict[str, List[Property]] = { + unique_parameters: set[tuple[str, oai.ParameterLocation]] = set() + parameters_by_location: dict[str, list[Property]] = { oai.ParameterLocation.QUERY: endpoint.query_parameters, oai.ParameterLocation.PATH: endpoint.path_parameters, oai.ParameterLocation.HEADER: endpoint.header_parameters, @@ -312,7 +319,7 @@ def _check_parameters_for_conflicts( self, *, config: Config, - previously_modified_params: Optional[Set[Tuple[oai.ParameterLocation, str]]] = None, + previously_modified_params: Optional[set[tuple[oai.ParameterLocation, str]]] = None, ) -> Union["Endpoint", ParseError]: """Check for conflicting parameters @@ -324,7 +331,7 @@ def _check_parameters_for_conflicts( unique python_name. """ modified_params = previously_modified_params or set() - used_python_names: Dict[PythonIdentifier, Tuple[oai.ParameterLocation, Property]] = {} + used_python_names: dict[PythonIdentifier, tuple[oai.ParameterLocation, Property]] = {} reserved_names = ["client", "url"] for parameter in self.iter_all_parameters(): location, prop = parameter @@ -400,13 +407,13 @@ def from_data( data: oai.Operation, path: str, method: str, - tag: str, + tags: list[PythonIdentifier], schemas: Schemas, parameters: Parameters, - request_bodies: Dict[str, Union[oai.RequestBody, oai.Reference]], - responses: Dict[str, Union[oai.Response, oai.Reference]], + request_bodies: dict[str, Union[oai.RequestBody, oai.Reference]], + responses: dict[str, Union[oai.Response, oai.Reference]], config: Config, - ) -> Tuple[Union["Endpoint", ParseError], Schemas, Parameters]: + ) -> tuple[Union["Endpoint", ParseError], Schemas, Parameters]: """Construct an endpoint from the OpenAPI data""" if data.operationId is None: @@ -421,7 +428,7 @@ def from_data( description=utils.remove_string_escapes(data.description) if data.description else "", name=name, requires_security=bool(data.security), - tag=tag, + tags=tags, ) result, schemas, parameters = Endpoint.add_parameters( @@ -476,15 +483,15 @@ def response_type(self) -> str: return self.responses[0].prop.get_type_string(quoted=False) return f"Union[{', '.join(types)}]" - def iter_all_parameters(self) -> Iterator[Tuple[oai.ParameterLocation, Property]]: + def iter_all_parameters(self) -> Iterator[tuple[oai.ParameterLocation, Property]]: """Iterate through all the parameters of this endpoint""" yield from ((oai.ParameterLocation.PATH, param) for param in self.path_parameters) yield from ((oai.ParameterLocation.QUERY, param) for param in self.query_parameters) yield from ((oai.ParameterLocation.HEADER, param) for param in self.header_parameters) yield from ((oai.ParameterLocation.COOKIE, param) for param in self.cookie_parameters) - def list_all_parameters(self) -> List[Property]: - """Return a List of all the parameters of this endpoint""" + def list_all_parameters(self) -> list[Property]: + """Return a list of all the parameters of this endpoint""" return ( self.path_parameters + self.query_parameters @@ -502,12 +509,12 @@ class GeneratorData: description: Optional[str] version: str models: Iterator[ModelProperty] - errors: List[ParseError] - endpoint_collections_by_tag: Dict[utils.PythonIdentifier, EndpointCollection] + errors: list[ParseError] + endpoint_collections_by_tag: dict[utils.PythonIdentifier, EndpointCollection] enums: Iterator[Union[EnumProperty, LiteralEnumProperty]] @staticmethod - def from_dict(data: Dict[str, Any], *, config: Config) -> Union["GeneratorData", GeneratorError]: + def from_dict(data: dict[str, Any], *, config: Config) -> Union["GeneratorData", GeneratorError]: """Create an OpenAPI from dict""" try: openapi = oai.OpenAPI.model_validate(data) diff --git a/openapi_python_client/parser/properties/__init__.py b/openapi_python_client/parser/properties/__init__.py index 94c6e3d08..ba667347b 100644 --- a/openapi_python_client/parser/properties/__init__.py +++ b/openapi_python_client/parser/properties/__init__.py @@ -9,12 +9,12 @@ "Parameters", "Property", "Schemas", - "build_schemas", "build_parameters", + "build_schemas", "property_from_data", ] -from typing import Iterable +from collections.abc import Iterable from attrs import evolve diff --git a/openapi_python_client/parser/properties/enum_property.py b/openapi_python_client/parser/properties/enum_property.py index 07c815899..c47d60961 100644 --- a/openapi_python_client/parser/properties/enum_property.py +++ b/openapi_python_client/parser/properties/enum_property.py @@ -2,7 +2,7 @@ __all__ = ["EnumProperty", "ValueType"] -from typing import Any, ClassVar, List, Union, cast +from typing import Any, ClassVar, Union, cast from attr import evolve from attrs import define @@ -99,7 +99,7 @@ def build( # noqa: PLR0911 if value_type not in (str, int): return PropertyError(header=f"Unsupported enum type {value_type}", data=data), schemas value_list = cast( - Union[List[int], List[str]], unchecked_value_list + Union[list[int], list[str]], unchecked_value_list ) # We checked this with all the value_types stuff if len(value_list) < len(enum): # Only one of the values was None, that becomes a union diff --git a/openapi_python_client/parser/properties/list_property.py b/openapi_python_client/parser/properties/list_property.py index 47a52cda3..bf0756fe3 100644 --- a/openapi_python_client/parser/properties/list_property.py +++ b/openapi_python_client/parser/properties/list_property.py @@ -106,10 +106,10 @@ def convert_value(self, value: Any) -> Value | None | PropertyError: return None # pragma: no cover def get_base_type_string(self, *, quoted: bool = False) -> str: - return f"List[{self.inner_property.get_type_string(quoted=not self.inner_property.is_base_type)}]" + return f"list[{self.inner_property.get_type_string(quoted=not self.inner_property.is_base_type)}]" def get_base_json_type_string(self, *, quoted: bool = False) -> str: - return f"List[{self.inner_property.get_type_string(json=True, quoted=not self.inner_property.is_base_type)}]" + return f"list[{self.inner_property.get_type_string(json=True, quoted=not self.inner_property.is_base_type)}]" def get_instance_type_string(self) -> str: """Get a string representation of runtime type that should be used for `isinstance` checks""" @@ -125,7 +125,7 @@ def get_imports(self, *, prefix: str) -> set[str]: """ imports = super().get_imports(prefix=prefix) imports.update(self.inner_property.get_imports(prefix=prefix)) - imports.add("from typing import cast, List") + imports.add("from typing import cast") return imports def get_lazy_imports(self, *, prefix: str) -> set[str]: @@ -151,7 +151,7 @@ def get_type_string( if json: type_string = self.get_base_json_type_string() elif multipart: - type_string = "Tuple[None, bytes, str]" + type_string = "tuple[None, bytes, str]" else: type_string = self.get_base_type_string() diff --git a/openapi_python_client/parser/properties/literal_enum_property.py b/openapi_python_client/parser/properties/literal_enum_property.py index c305a9a41..669b62f58 100644 --- a/openapi_python_client/parser/properties/literal_enum_property.py +++ b/openapi_python_client/parser/properties/literal_enum_property.py @@ -2,7 +2,7 @@ __all__ = ["LiteralEnumProperty"] -from typing import Any, ClassVar, List, Union, cast +from typing import Any, ClassVar, Union, cast from attr import evolve from attrs import define @@ -98,7 +98,7 @@ def build( # noqa: PLR0911 if value_type not in (str, int): return PropertyError(header=f"Unsupported enum type {value_type}", data=data), schemas value_list = cast( - Union[List[int], List[str]], unchecked_value_list + Union[list[int], list[str]], unchecked_value_list ) # We checked this with all the value_types stuff if len(value_list) < len(enum): # Only one of the values was None, that becomes a union diff --git a/openapi_python_client/parser/properties/model_property.py b/openapi_python_client/parser/properties/model_property.py index c0846f2d1..875a4a5f8 100644 --- a/openapi_python_client/parser/properties/model_property.py +++ b/openapi_python_client/parser/properties/model_property.py @@ -33,7 +33,7 @@ class ModelProperty(PropertyProtocol, HasNamedClass): lazy_imports: set[str] | None additional_properties: Property | None ref_path: ReferencePath | None = None - _json_type_string: ClassVar[str] = "Dict[str, Any]" + _json_type_string: ClassVar[str] = "dict[str, Any]" template: ClassVar[str] = "model_property.py.jinja" json_is_dict: ClassVar[bool] = True @@ -155,7 +155,6 @@ def get_imports(self, *, prefix: str) -> set[str]: imports = super().get_imports(prefix=prefix) imports.update( { - "from typing import Dict", "from typing import cast", } ) @@ -204,7 +203,7 @@ def get_type_string( if json: type_string = self.get_base_json_type_string() elif multipart: - type_string = "Tuple[None, bytes, str]" + type_string = "tuple[None, bytes, str]" else: type_string = self.get_base_type_string() diff --git a/openapi_python_client/parser/properties/protocol.py b/openapi_python_client/parser/properties/protocol.py index fa47f023e..1315172b7 100644 --- a/openapi_python_client/parser/properties/protocol.py +++ b/openapi_python_client/parser/properties/protocol.py @@ -119,7 +119,7 @@ def get_type_string( if json: type_string = self.get_base_json_type_string(quoted=quoted) elif multipart: - type_string = "Tuple[None, bytes, str]" + type_string = "tuple[None, bytes, str]" else: type_string = self.get_base_type_string(quoted=quoted) diff --git a/openapi_python_client/parser/properties/schemas.py b/openapi_python_client/parser/properties/schemas.py index d8d931773..d1f4aeb3f 100644 --- a/openapi_python_client/parser/properties/schemas.py +++ b/openapi_python_client/parser/properties/schemas.py @@ -1,16 +1,16 @@ __all__ = [ "Class", - "Schemas", "Parameters", "ReferencePath", + "Schemas", + "parameter_from_data", + "parameter_from_reference", "parse_reference_path", - "update_schemas_with_data", "update_parameters_with_data", - "parameter_from_reference", - "parameter_from_data", + "update_schemas_with_data", ] -from typing import TYPE_CHECKING, Dict, List, NewType, Set, Tuple, Union, cast +from typing import TYPE_CHECKING, NewType, Union, cast from urllib.parse import urlparse from attrs import define, evolve, field @@ -83,13 +83,13 @@ def from_string(*, string: str, config: Config) -> "Class": class Schemas: """Structure for containing all defined, shareable, and reusable schemas (attr classes and Enums)""" - classes_by_reference: Dict[ReferencePath, Property] = field(factory=dict) - dependencies: Dict[ReferencePath, Set[Union[ReferencePath, ClassName]]] = field(factory=dict) - classes_by_name: Dict[ClassName, Property] = field(factory=dict) - models_to_process: List[ModelProperty] = field(factory=list) - errors: List[ParseError] = field(factory=list) + classes_by_reference: dict[ReferencePath, Property] = field(factory=dict) + dependencies: dict[ReferencePath, set[Union[ReferencePath, ClassName]]] = field(factory=dict) + classes_by_name: dict[ClassName, Property] = field(factory=dict) + models_to_process: list[ModelProperty] = field(factory=list) + errors: list[ParseError] = field(factory=list) - def add_dependencies(self, ref_path: ReferencePath, roots: Set[Union[ReferencePath, ClassName]]) -> None: + def add_dependencies(self, ref_path: ReferencePath, roots: set[Union[ReferencePath, ClassName]]) -> None: """Record new dependencies on the given ReferencePath Args: @@ -159,9 +159,9 @@ def update_schemas_with_data( class Parameters: """Structure for containing all defined, shareable, and reusable parameters""" - classes_by_reference: Dict[ReferencePath, Parameter] = field(factory=dict) - classes_by_name: Dict[ClassName, Parameter] = field(factory=dict) - errors: List[ParseError] = field(factory=list) + classes_by_reference: dict[ReferencePath, Parameter] = field(factory=dict) + classes_by_name: dict[ClassName, Parameter] = field(factory=dict) + errors: list[ParseError] = field(factory=list) def parameter_from_data( @@ -170,7 +170,7 @@ def parameter_from_data( data: Union[oai.Reference, oai.Parameter], parameters: Parameters, config: Config, -) -> Tuple[Union[Parameter, ParameterError], Parameters]: +) -> tuple[Union[Parameter, ParameterError], Parameters]: """Generates parameters from an OpenAPI Parameter spec.""" if isinstance(data, oai.Reference): diff --git a/openapi_python_client/parser/responses.py b/openapi_python_client/parser/responses.py index 4725ba3c7..ec0f6136b 100644 --- a/openapi_python_client/parser/responses.py +++ b/openapi_python_client/parser/responses.py @@ -1,7 +1,7 @@ __all__ = ["Response", "response_from_data"] from http import HTTPStatus -from typing import Dict, Optional, Tuple, TypedDict, Union +from typing import Optional, TypedDict, Union from attrs import define @@ -85,10 +85,10 @@ def response_from_data( # noqa: PLR0911 status_code: HTTPStatus, data: Union[oai.Response, oai.Reference], schemas: Schemas, - responses: Dict[str, Union[oai.Response, oai.Reference]], + responses: dict[str, Union[oai.Response, oai.Reference]], parent_name: str, config: Config, -) -> Tuple[Union[Response, ParseError], Schemas]: +) -> tuple[Union[Response, ParseError], Schemas]: """Generate a Response from the OpenAPI dictionary representation of it""" response_name = f"response_{status_code}" diff --git a/openapi_python_client/schema/__init__.py b/openapi_python_client/schema/__init__.py index bfc0a0b5b..021007ade 100644 --- a/openapi_python_client/schema/__init__.py +++ b/openapi_python_client/schema/__init__.py @@ -1,13 +1,13 @@ __all__ = [ + "DataType", "Discriminator", "MediaType", "OpenAPI", "Operation", "Parameter", + "Parameter", "ParameterLocation", - "DataType", "PathItem", - "Parameter", "Reference", "RequestBody", "Response", diff --git a/openapi_python_client/schema/openapi_schema_pydantic/__init__.py b/openapi_python_client/schema/openapi_schema_pydantic/__init__.py index 6b02446a8..b61cefc66 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/__init__.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/__init__.py @@ -7,6 +7,8 @@ """ __all__ = [ + "XML", + "Callback", "Components", "Contact", "Discriminator", @@ -35,8 +37,6 @@ "Server", "ServerVariable", "Tag", - "XML", - "Callback", ] @@ -70,3 +70,14 @@ from .server_variable import ServerVariable from .tag import Tag from .xml import XML + +PathItem.model_rebuild() +Operation.model_rebuild() +Components.model_rebuild() +Encoding.model_rebuild() +MediaType.model_rebuild() +OpenAPI.model_rebuild() +Parameter.model_rebuild() +Header.model_rebuild() +RequestBody.model_rebuild() +Response.model_rebuild() diff --git a/openapi_python_client/schema/openapi_schema_pydantic/callback.py b/openapi_python_client/schema/openapi_schema_pydantic/callback.py index 22426d925..f4593cc8d 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/callback.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/callback.py @@ -1,11 +1,11 @@ -from typing import TYPE_CHECKING, Dict +from typing import TYPE_CHECKING if TYPE_CHECKING: # pragma: no cover from .path_item import PathItem else: PathItem = "PathItem" -Callback = Dict[str, PathItem] +Callback = dict[str, PathItem] """ A map of possible out-of band callbacks related to the parent operation. Each value in the map is a [Path Item Object](#pathItemObject) diff --git a/openapi_python_client/schema/openapi_schema_pydantic/components.py b/openapi_python_client/schema/openapi_schema_pydantic/components.py index f366a2ec8..babe26265 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/components.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/components.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional, Union +from typing import Optional, Union from pydantic import BaseModel, ConfigDict @@ -25,16 +25,18 @@ class Components(BaseModel): - https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#componentsObject """ - schemas: Optional[Dict[str, Union[Schema, Reference]]] = None - responses: Optional[Dict[str, Union[Response, Reference]]] = None - parameters: Optional[Dict[str, Union[Parameter, Reference]]] = None - examples: Optional[Dict[str, Union[Example, Reference]]] = None - requestBodies: Optional[Dict[str, Union[RequestBody, Reference]]] = None - headers: Optional[Dict[str, Union[Header, Reference]]] = None - securitySchemes: Optional[Dict[str, Union[SecurityScheme, Reference]]] = None - links: Optional[Dict[str, Union[Link, Reference]]] = None - callbacks: Optional[Dict[str, Union[Callback, Reference]]] = None + schemas: Optional[dict[str, Union[Schema, Reference]]] = None + responses: Optional[dict[str, Union[Response, Reference]]] = None + parameters: Optional[dict[str, Union[Parameter, Reference]]] = None + examples: Optional[dict[str, Union[Example, Reference]]] = None + requestBodies: Optional[dict[str, Union[RequestBody, Reference]]] = None + headers: Optional[dict[str, Union[Header, Reference]]] = None + securitySchemes: Optional[dict[str, Union[SecurityScheme, Reference]]] = None + links: Optional[dict[str, Union[Link, Reference]]] = None + callbacks: Optional[dict[str, Union[Callback, Reference]]] = None model_config = ConfigDict( + # `Callback` contains an unresolvable forward reference, will rebuild in `__init__.py`: + defer_build=True, extra="allow", json_schema_extra={ "examples": [ diff --git a/openapi_python_client/schema/openapi_schema_pydantic/discriminator.py b/openapi_python_client/schema/openapi_schema_pydantic/discriminator.py index 95161d07a..9f36773ba 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/discriminator.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/discriminator.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from typing import Optional from pydantic import BaseModel, ConfigDict @@ -19,7 +19,7 @@ class Discriminator(BaseModel): """ propertyName: str - mapping: Optional[Dict[str, str]] = None + mapping: Optional[dict[str, str]] = None model_config = ConfigDict( extra="allow", json_schema_extra={ diff --git a/openapi_python_client/schema/openapi_schema_pydantic/encoding.py b/openapi_python_client/schema/openapi_schema_pydantic/encoding.py index b7434c50c..ebf6295dc 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/encoding.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/encoding.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from pydantic import BaseModel, ConfigDict @@ -6,8 +6,6 @@ if TYPE_CHECKING: # pragma: no cover from .header import Header -else: - Header = "Header" class Encoding(BaseModel): @@ -19,11 +17,13 @@ class Encoding(BaseModel): """ contentType: Optional[str] = None - headers: Optional[Dict[str, Union[Header, Reference]]] = None + headers: Optional[dict[str, Union["Header", Reference]]] = None style: Optional[str] = None explode: bool = False allowReserved: bool = False model_config = ConfigDict( + # `Header` is an unresolvable forward reference, will rebuild in `__init__.py`: + defer_build=True, extra="allow", json_schema_extra={ "examples": [ diff --git a/openapi_python_client/schema/openapi_schema_pydantic/header.py b/openapi_python_client/schema/openapi_schema_pydantic/header.py index 2d2471ea9..2deb6f390 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/header.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/header.py @@ -21,6 +21,8 @@ class Header(Parameter): name: str = Field(default="") param_in: ParameterLocation = Field(default=ParameterLocation.HEADER, alias="in") model_config = ConfigDict( + # `Parameter` is not build yet, will rebuild in `__init__.py`: + defer_build=True, extra="allow", populate_by_name=True, json_schema_extra={ @@ -29,10 +31,3 @@ class Header(Parameter): ] }, ) - - -# Calling model_rebuild() here helps Pydantic to resolve the forward references that were used -# in defining Parameter and Encoding. Without this call, any subtle change to the loading order -# of schema submodules could result in an error like "Parameter is not fully defined". -# See: https://docs.pydantic.dev/latest/concepts/models/#rebuilding-model-schema -Parameter.model_rebuild() diff --git a/openapi_python_client/schema/openapi_schema_pydantic/link.py b/openapi_python_client/schema/openapi_schema_pydantic/link.py index 9f823c4a2..69cdf29c0 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/link.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/link.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, Optional +from typing import Any, Optional from pydantic import BaseModel, ConfigDict @@ -25,7 +25,7 @@ class Link(BaseModel): operationRef: Optional[str] = None operationId: Optional[str] = None - parameters: Optional[Dict[str, Any]] = None + parameters: Optional[dict[str, Any]] = None requestBody: Optional[Any] = None description: Optional[str] = None server: Optional[Server] = None diff --git a/openapi_python_client/schema/openapi_schema_pydantic/media_type.py b/openapi_python_client/schema/openapi_schema_pydantic/media_type.py index 1bda99560..95f9ede14 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/media_type.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/media_type.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union from pydantic import BaseModel, ConfigDict, Field @@ -18,9 +18,11 @@ class MediaType(BaseModel): media_type_schema: Optional[Union[Reference, Schema]] = Field(default=None, alias="schema") example: Optional[Any] = None - examples: Optional[Dict[str, Union[Example, Reference]]] = None - encoding: Optional[Dict[str, Encoding]] = None + examples: Optional[dict[str, Union[Example, Reference]]] = None + encoding: Optional[dict[str, Encoding]] = None model_config = ConfigDict( + # `Encoding` is not build yet, will rebuild in `__init__.py`: + defer_build=True, extra="allow", populate_by_name=True, json_schema_extra={ diff --git a/openapi_python_client/schema/openapi_schema_pydantic/oauth_flow.py b/openapi_python_client/schema/openapi_schema_pydantic/oauth_flow.py index c7485814f..16e366090 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/oauth_flow.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/oauth_flow.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from typing import Optional from pydantic import BaseModel, ConfigDict @@ -15,7 +15,7 @@ class OAuthFlow(BaseModel): authorizationUrl: Optional[str] = None tokenUrl: Optional[str] = None refreshUrl: Optional[str] = None - scopes: Dict[str, str] + scopes: dict[str, str] model_config = ConfigDict( extra="allow", json_schema_extra={ diff --git a/openapi_python_client/schema/openapi_schema_pydantic/open_api.py b/openapi_python_client/schema/openapi_schema_pydantic/open_api.py index 6a1b5ae12..e66ea942c 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/open_api.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/open_api.py @@ -1,13 +1,10 @@ -from typing import List, Optional +from typing import Optional from pydantic import BaseModel, ConfigDict, field_validator from .components import Components from .external_documentation import ExternalDocumentation from .info import Info - -# Required to update forward ref after object creation -from .path_item import PathItem # noqa: F401 from .paths import Paths from .security_requirement import SecurityRequirement from .server import Server @@ -25,14 +22,18 @@ class OpenAPI(BaseModel): """ info: Info - servers: List[Server] = [Server(url="/")] + servers: list[Server] = [Server(url="/")] paths: Paths components: Optional[Components] = None - security: Optional[List[SecurityRequirement]] = None - tags: Optional[List[Tag]] = None + security: Optional[list[SecurityRequirement]] = None + tags: Optional[list[Tag]] = None externalDocs: Optional[ExternalDocumentation] = None openapi: str - model_config = ConfigDict(extra="allow") + model_config = ConfigDict( + # `Components` is not build yet, will rebuild in `__init__.py`: + defer_build=True, + extra="allow", + ) @field_validator("openapi") @classmethod @@ -46,6 +47,3 @@ def check_openapi_version(cls, value: str) -> str: if int(parts[1]) > 1: raise ValueError(f"Only OpenAPI versions 3.1.* are supported, got {value}") return value - - -OpenAPI.model_rebuild() diff --git a/openapi_python_client/schema/openapi_schema_pydantic/operation.py b/openapi_python_client/schema/openapi_schema_pydantic/operation.py index 41f5e7100..ebf5e1faa 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/operation.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/operation.py @@ -1,14 +1,10 @@ -from typing import Dict, List, Optional, Union +from typing import Optional, Union from pydantic import BaseModel, ConfigDict, Field from .callback import Callback from .external_documentation import ExternalDocumentation -from .header import Header # noqa: F401 from .parameter import Parameter - -# Required to update forward ref after object creation, as this is not imported yet -from .path_item import PathItem # noqa: F401 from .reference import Reference from .request_body import RequestBody from .responses import Responses @@ -24,20 +20,22 @@ class Operation(BaseModel): - https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#operationObject """ - tags: Optional[List[str]] = None + tags: Optional[list[str]] = None summary: Optional[str] = None description: Optional[str] = None externalDocs: Optional[ExternalDocumentation] = None operationId: Optional[str] = None - parameters: Optional[List[Union[Parameter, Reference]]] = None + parameters: Optional[list[Union[Parameter, Reference]]] = None request_body: Optional[Union[RequestBody, Reference]] = Field(None, alias="requestBody") responses: Responses - callbacks: Optional[Dict[str, Callback]] = None + callbacks: Optional[dict[str, Callback]] = None deprecated: bool = False - security: Optional[List[SecurityRequirement]] = None - servers: Optional[List[Server]] = None + security: Optional[list[SecurityRequirement]] = None + servers: Optional[list[Server]] = None model_config = ConfigDict( + # `Callback` contains an unresolvable forward reference, will rebuild in `__init__.py`: + defer_build=True, extra="allow", json_schema_extra={ "examples": [ @@ -89,7 +87,3 @@ class Operation(BaseModel): ] }, ) - - -# PathItem in Callback uses Operation, so we need to update forward refs due to circular dependency -Operation.model_rebuild() diff --git a/openapi_python_client/schema/openapi_schema_pydantic/parameter.py b/openapi_python_client/schema/openapi_schema_pydantic/parameter.py index 25ba819f1..6f6fe9342 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/parameter.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/parameter.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, Optional, Union +from typing import Any, Optional, Union from pydantic import BaseModel, ConfigDict, Field @@ -32,9 +32,11 @@ class Parameter(BaseModel): allowReserved: bool = False param_schema: Optional[Union[Reference, Schema]] = Field(default=None, alias="schema") example: Optional[Any] = None - examples: Optional[Dict[str, Union[Example, Reference]]] = None - content: Optional[Dict[str, MediaType]] = None + examples: Optional[dict[str, Union[Example, Reference]]] = None + content: Optional[dict[str, MediaType]] = None model_config = ConfigDict( + # `MediaType` is not build yet, will rebuild in `__init__.py`: + defer_build=True, extra="allow", populate_by_name=True, json_schema_extra={ diff --git a/openapi_python_client/schema/openapi_schema_pydantic/path_item.py b/openapi_python_client/schema/openapi_schema_pydantic/path_item.py index 36edee0e3..8c1eab6ea 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/path_item.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/path_item.py @@ -1,4 +1,4 @@ -from typing import List, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from pydantic import BaseModel, ConfigDict, Field @@ -6,6 +6,9 @@ from .reference import Reference from .server import Server +if TYPE_CHECKING: + from .operation import Operation # pragma: no cover + class PathItem(BaseModel): """ @@ -30,9 +33,11 @@ class PathItem(BaseModel): head: Optional["Operation"] = None patch: Optional["Operation"] = None trace: Optional["Operation"] = None - servers: Optional[List[Server]] = None - parameters: Optional[List[Union[Parameter, Reference]]] = None + servers: Optional[list[Server]] = None + parameters: Optional[list[Union[Parameter, Reference]]] = None model_config = ConfigDict( + # `Operation` is an unresolvable forward reference, will rebuild in `__init__.py`: + defer_build=True, extra="allow", populate_by_name=True, json_schema_extra={ @@ -69,9 +74,3 @@ class PathItem(BaseModel): ] }, ) - - -# Operation uses PathItem via Callback, so we need late import and to update forward refs due to circular dependency -from .operation import Operation # noqa: E402 - -PathItem.model_rebuild() diff --git a/openapi_python_client/schema/openapi_schema_pydantic/paths.py b/openapi_python_client/schema/openapi_schema_pydantic/paths.py index d61ea7b18..86c1dfd19 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/paths.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/paths.py @@ -1,8 +1,6 @@ -from typing import Dict - from .path_item import PathItem -Paths = Dict[str, PathItem] +Paths = dict[str, PathItem] """ Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the [`Server Object`](#serverObject) in order to construct the full URL. diff --git a/openapi_python_client/schema/openapi_schema_pydantic/request_body.py b/openapi_python_client/schema/openapi_schema_pydantic/request_body.py index 6b1847215..8cd9bb527 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/request_body.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/request_body.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from typing import Optional from pydantic import BaseModel, ConfigDict @@ -14,9 +14,11 @@ class RequestBody(BaseModel): """ description: Optional[str] = None - content: Dict[str, MediaType] + content: dict[str, MediaType] required: bool = False model_config = ConfigDict( + # `MediaType` is not build yet, will rebuild in `__init__.py`: + defer_build=True, extra="allow", json_schema_extra={ "examples": [ diff --git a/openapi_python_client/schema/openapi_schema_pydantic/response.py b/openapi_python_client/schema/openapi_schema_pydantic/response.py index a7c5d08ec..b7ec0d357 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/response.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/response.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional, Union +from typing import Optional, Union from pydantic import BaseModel, ConfigDict @@ -19,10 +19,12 @@ class Response(BaseModel): """ description: str - headers: Optional[Dict[str, Union[Header, Reference]]] = None - content: Optional[Dict[str, MediaType]] = None - links: Optional[Dict[str, Union[Link, Reference]]] = None + headers: Optional[dict[str, Union[Header, Reference]]] = None + content: Optional[dict[str, MediaType]] = None + links: Optional[dict[str, Union[Link, Reference]]] = None model_config = ConfigDict( + # `MediaType` is not build yet, will rebuild in `__init__.py`: + defer_build=True, extra="allow", json_schema_extra={ "examples": [ diff --git a/openapi_python_client/schema/openapi_schema_pydantic/responses.py b/openapi_python_client/schema/openapi_schema_pydantic/responses.py index 53306ae1c..17ddc13fe 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/responses.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/responses.py @@ -1,9 +1,9 @@ -from typing import Dict, Union +from typing import Union from .reference import Reference from .response import Response -Responses = Dict[str, Union[Response, Reference]] +Responses = dict[str, Union[Response, Reference]] """ A container for the expected responses of an operation. The container maps a HTTP response code to the expected response. diff --git a/openapi_python_client/schema/openapi_schema_pydantic/schema.py b/openapi_python_client/schema/openapi_schema_pydantic/schema.py index d42ccc6ad..99c64eb51 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/schema.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/schema.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Optional, Union +from typing import Any, Optional, Union from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, model_validator @@ -34,17 +34,17 @@ class Schema(BaseModel): uniqueItems: Optional[bool] = None maxProperties: Optional[int] = Field(default=None, ge=0) minProperties: Optional[int] = Field(default=None, ge=0) - required: Optional[List[str]] = Field(default=None) - enum: Union[None, List[Any]] = Field(default=None, min_length=1) + required: Optional[list[str]] = Field(default=None) + enum: Union[None, list[Any]] = Field(default=None, min_length=1) const: Union[None, StrictStr, StrictInt, StrictFloat, StrictBool] = None - type: Union[DataType, List[DataType], None] = Field(default=None) - allOf: List[Union[Reference, "Schema"]] = Field(default_factory=list) - oneOf: List[Union[Reference, "Schema"]] = Field(default_factory=list) - anyOf: List[Union[Reference, "Schema"]] = Field(default_factory=list) + type: Union[DataType, list[DataType], None] = Field(default=None) + allOf: list[Union[Reference, "Schema"]] = Field(default_factory=list) + oneOf: list[Union[Reference, "Schema"]] = Field(default_factory=list) + anyOf: list[Union[Reference, "Schema"]] = Field(default_factory=list) schema_not: Optional[Union[Reference, "Schema"]] = Field(default=None, alias="not") items: Optional[Union[Reference, "Schema"]] = None - prefixItems: Optional[List[Union[Reference, "Schema"]]] = Field(default_factory=list) - properties: Optional[Dict[str, Union[Reference, "Schema"]]] = None + prefixItems: list[Union[Reference, "Schema"]] = Field(default_factory=list) + properties: Optional[dict[str, Union[Reference, "Schema"]]] = None additionalProperties: Optional[Union[bool, Reference, "Schema"]] = None description: Optional[str] = None schema_format: Optional[str] = Field(default=None, alias="format") @@ -206,6 +206,3 @@ def handle_nullable(self) -> "Schema": self.oneOf = [Schema(type=DataType.NULL), Schema(allOf=self.allOf)] self.allOf = [] return self - - -Schema.model_rebuild() diff --git a/openapi_python_client/schema/openapi_schema_pydantic/security_requirement.py b/openapi_python_client/schema/openapi_schema_pydantic/security_requirement.py index b3cca3b08..58a487dc7 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/security_requirement.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/security_requirement.py @@ -1,6 +1,4 @@ -from typing import Dict, List - -SecurityRequirement = Dict[str, List[str]] +SecurityRequirement = dict[str, list[str]] """ Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the diff --git a/openapi_python_client/schema/openapi_schema_pydantic/server.py b/openapi_python_client/schema/openapi_schema_pydantic/server.py index d573a93fe..6bc21766c 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/server.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/server.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from typing import Optional from pydantic import BaseModel, ConfigDict @@ -15,7 +15,7 @@ class Server(BaseModel): url: str description: Optional[str] = None - variables: Optional[Dict[str, ServerVariable]] = None + variables: Optional[dict[str, ServerVariable]] = None model_config = ConfigDict( extra="allow", json_schema_extra={ diff --git a/openapi_python_client/schema/openapi_schema_pydantic/server_variable.py b/openapi_python_client/schema/openapi_schema_pydantic/server_variable.py index 3b63c9ad2..8a869c40e 100644 --- a/openapi_python_client/schema/openapi_schema_pydantic/server_variable.py +++ b/openapi_python_client/schema/openapi_schema_pydantic/server_variable.py @@ -1,4 +1,4 @@ -from typing import List, Optional +from typing import Optional from pydantic import BaseModel, ConfigDict @@ -11,7 +11,7 @@ class ServerVariable(BaseModel): - https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#serverVariableObject """ - enum: Optional[List[str]] = None + enum: Optional[list[str]] = None default: str description: Optional[str] = None model_config = ConfigDict(extra="allow") diff --git a/openapi_python_client/templates/client.py.jinja b/openapi_python_client/templates/client.py.jinja index 4f224e6e8..aee6096e9 100644 --- a/openapi_python_client/templates/client.py.jinja +++ b/openapi_python_client/templates/client.py.jinja @@ -1,5 +1,5 @@ import ssl -from typing import Any, Dict, Union, Optional +from typing import Any, Union, Optional from attrs import define, field, evolve import httpx @@ -38,17 +38,17 @@ class Client: {% macro attributes() %} raise_on_unexpected_status: bool = field(default=False, kw_only=True) _base_url: str = field(alias="base_url") - _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") _client: Optional[httpx.Client] = field(default=None, init=False) _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) {% endmacro %}{{ attributes() }} {% macro builders(self) %} - def with_headers(self, headers: Dict[str, str]) -> "{{ self }}": + def with_headers(self, headers: dict[str, str]) -> "{{ self }}": """Get a new client matching this one with additional headers""" if self._client is not None: self._client.headers.update(headers) @@ -56,7 +56,7 @@ class Client: self._async_client.headers.update(headers) return evolve(self, headers={**self._headers, **headers}) - def with_cookies(self, cookies: Dict[str, str]) -> "{{ self }}": + def with_cookies(self, cookies: dict[str, str]) -> "{{ self }}": """Get a new client matching this one with additional cookies""" if self._client is not None: self._client.cookies.update(cookies) diff --git a/openapi_python_client/templates/endpoint_macros.py.jinja b/openapi_python_client/templates/endpoint_macros.py.jinja index 79ca33d57..2da580af4 100644 --- a/openapi_python_client/templates/endpoint_macros.py.jinja +++ b/openapi_python_client/templates/endpoint_macros.py.jinja @@ -3,7 +3,7 @@ {% macro header_params(endpoint) %} {% if endpoint.header_parameters or endpoint.bodies | length > 0 %} -headers: Dict[str, Any] = {} +headers: dict[str, Any] = {} {% if endpoint.header_parameters %} {% for parameter in endpoint.header_parameters %} {% import "property_templates/" + parameter.template as param_template %} @@ -37,7 +37,7 @@ if {{ parameter.python_name }} is not UNSET: {% macro query_params(endpoint) %} {% if endpoint.query_parameters %} -params: Dict[str, Any] = {} +params: dict[str, Any] = {} {% for property in endpoint.query_parameters %} {% set destination = property.python_name %} diff --git a/openapi_python_client/templates/endpoint_module.py.jinja b/openapi_python_client/templates/endpoint_module.py.jinja index d89f09367..35090614c 100644 --- a/openapi_python_client/templates/endpoint_module.py.jinja +++ b/openapi_python_client/templates/endpoint_module.py.jinja @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union, cast +from typing import Any, Optional, Union, cast import httpx @@ -19,14 +19,14 @@ from ... import errors def _get_kwargs( {{ arguments(endpoint, include_client=False) | indent(4) }} -) -> Dict[str, Any]: +) -> dict[str, Any]: {{ header_params(endpoint) | indent(4) }} {{ cookie_params(endpoint) | indent(4) }} {{ query_params(endpoint) | indent(4) }} - _kwargs: Dict[str, Any] = { + _kwargs: dict[str, Any] = { "method": "{{ endpoint.method }}", {% if endpoint.path_parameters %} "url": "{{ endpoint.path }}".format( diff --git a/openapi_python_client/templates/literal_enum.py.jinja b/openapi_python_client/templates/literal_enum.py.jinja index df993adb7..72207efa3 100644 --- a/openapi_python_client/templates/literal_enum.py.jinja +++ b/openapi_python_client/templates/literal_enum.py.jinja @@ -1,8 +1,8 @@ -from typing import Literal, Set, cast +from typing import Literal, cast {{ enum.class_info.name }} = Literal{{ "%r" | format(enum.values|list|sort) }} -{{ enum.get_class_name_snake_case() | upper }}_VALUES: Set[{{ enum.class_info.name }}] = { {% for v in enum.values|list|sort %}{{"%r"|format(v)}}, {% endfor %} } +{{ enum.get_class_name_snake_case() | upper }}_VALUES: set[{{ enum.class_info.name }}] = { {% for v in enum.values|list|sort %}{{"%r"|format(v)}}, {% endfor %} } def check_{{ enum.get_class_name_snake_case() }}(value: {{ enum.get_instance_type_string() }}) -> {{ enum.class_info.name}}: if value in {{ enum.get_class_name_snake_case() | upper }}_VALUES: diff --git a/openapi_python_client/templates/model.py.jinja b/openapi_python_client/templates/model.py.jinja index 012201426..739f68962 100644 --- a/openapi_python_client/templates/model.py.jinja +++ b/openapi_python_client/templates/model.py.jinja @@ -1,9 +1,4 @@ -from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING - -{% if model.additional_properties %} -from typing import List - -{% endif %} +from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -74,7 +69,7 @@ class {{ class_name }}: {% endif %} {% endfor %} {% if model.additional_properties %} - additional_properties: Dict[str, {{ additional_property_type }}] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, {{ additional_property_type }}] = _attrs_field(init=False, factory=dict) {% endif %} {% macro _to_dict(multipart=False) %} @@ -90,7 +85,7 @@ class {{ class_name }}: {% endfor %} -field_dict: Dict[str, Any] = {} +field_dict: dict[str, Any] = {} {% if model.additional_properties %} {% import "property_templates/" + model.additional_properties.template as prop_template %} {% if multipart %} @@ -122,19 +117,19 @@ if {{ property.python_name }} is not UNSET: return field_dict {% endmacro %} - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: {% for lazy_import in model.lazy_imports %} {{ lazy_import }} {% endfor %} {{ _to_dict() | indent(8) }} {% if model.is_multipart_body %} - def to_multipart(self) -> Dict[str, Any]: + def to_multipart(self) -> dict[str, Any]: {{ _to_dict(multipart=True) | indent(8) }} {% endif %} @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: {% for lazy_import in model.lazy_imports %} {{ lazy_import }} {% endfor %} @@ -188,7 +183,7 @@ return field_dict {% if model.additional_properties %} @property - def additional_keys(self) -> List[str]: + def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> {{ additional_property_type }}: diff --git a/openapi_python_client/templates/property_templates/enum_property.py.jinja b/openapi_python_client/templates/property_templates/enum_property.py.jinja index ea9b66a51..c46538eac 100644 --- a/openapi_python_client/templates/property_templates/enum_property.py.jinja +++ b/openapi_python_client/templates/property_templates/enum_property.py.jinja @@ -24,7 +24,7 @@ if not isinstance({{ source }}, Unset): {% macro transform_multipart(property, source, destination) %} {% set transformed = "(None, str(" + source + ".value" + ").encode(), \"text/plain\")" %} -{% set type_string = "Union[Unset, Tuple[None, bytes, str]]" %} +{% set type_string = "Union[Unset, tuple[None, bytes, str]]" %} {% if property.required %} {{ destination }} = {{ transformed }} {%- else %} diff --git a/openapi_python_client/templates/property_templates/list_property.py.jinja b/openapi_python_client/templates/property_templates/list_property.py.jinja index c827b6d54..94a9c6d65 100644 --- a/openapi_python_client/templates/property_templates/list_property.py.jinja +++ b/openapi_python_client/templates/property_templates/list_property.py.jinja @@ -54,7 +54,7 @@ if not isinstance({{ source }}, Unset): {% macro transform_multipart(property, source, destination) %} {% set inner_property = property.inner_property %} -{% set type_string = "Union[Unset, Tuple[None, bytes, str]]" %} +{% set type_string = "Union[Unset, tuple[None, bytes, str]]" %} {% if property.required %} {{ _transform(property, source, destination, True, "to_dict") }} {% else %} diff --git a/openapi_python_client/templates/property_templates/literal_enum_property.py.jinja b/openapi_python_client/templates/property_templates/literal_enum_property.py.jinja index 680ebfabe..1506284d7 100644 --- a/openapi_python_client/templates/property_templates/literal_enum_property.py.jinja +++ b/openapi_python_client/templates/property_templates/literal_enum_property.py.jinja @@ -23,7 +23,7 @@ if not isinstance({{ source }}, Unset): {% macro transform_multipart(property, source, destination) %} {% set transformed = "(None, str(" + source + ").encode(), \"text/plain\")" %} -{% set type_string = "Union[Unset, Tuple[None, bytes, str]]" %} +{% set type_string = "Union[Unset, tuple[None, bytes, str]]" %} {% if property.required %} {{ destination }} = {{ transformed }} {%- else %} diff --git a/openapi_python_client/templates/pyproject.toml.jinja b/openapi_python_client/templates/pyproject.toml.jinja index 7f68d58e5..e9344b436 100644 --- a/openapi_python_client/templates/pyproject.toml.jinja +++ b/openapi_python_client/templates/pyproject.toml.jinja @@ -9,7 +9,7 @@ version = "{{ package_version }}" description = "{{ package_description }}" authors = [] readme = "README.md" -{% if pdm %}requires-python = ">=3.8,<4.0"{% endif %} +{% if pdm %}requires-python = ">=3.9,<4.0"{% endif %} {% if poetry %} packages = [ {include = "{{ package_name }}"}, @@ -19,8 +19,8 @@ include = ["CHANGELOG.md", "{{ package_name }}/py.typed"] {% if pdm %} dependencies = [ - "httpx>=0.20.0,<0.28.0", - "attrs>=21.3.0", + "httpx>=0.20.0,<0.29.0", + "attrs>=22.2.0", "python-dateutil>=2.8.0", ] @@ -30,9 +30,9 @@ distribution = true {% if poetry %} [tool.poetry.dependencies] -python = "^3.8" -httpx = ">=0.20.0,<0.28.0" -attrs = ">=21.3.0" +python = "^3.9" +httpx = ">=0.20.0,<0.29.0" +attrs = ">=22.2.0" python-dateutil = "^2.8.0" {% endif %} diff --git a/openapi_python_client/templates/setup.py.jinja b/openapi_python_client/templates/setup.py.jinja index 87c0cc063..c7c1a5a94 100644 --- a/openapi_python_client/templates/setup.py.jinja +++ b/openapi_python_client/templates/setup.py.jinja @@ -12,7 +12,7 @@ setup( long_description=long_description, long_description_content_type="text/markdown", packages=find_packages(), - python_requires=">=3.8, <4", - install_requires=["httpx >= 0.20.0, < 0.28.0", "attrs >= 21.3.0", "python-dateutil >= 2.8.0, < 3"], + python_requires=">=3.9, <4", + install_requires=["httpx >= 0.20.0, < 0.29.0", "attrs >= 22.2.0", "python-dateutil >= 2.8.0, < 3"], package_data={"{{ package_name }}": ["py.typed"]}, ) diff --git a/openapi_python_client/templates/types.py.jinja b/openapi_python_client/templates/types.py.jinja index cc151acb3..6e0d6206c 100644 --- a/openapi_python_client/templates/types.py.jinja +++ b/openapi_python_client/templates/types.py.jinja @@ -1,6 +1,8 @@ """ Contains some shared types for properties """ + +from collections.abc import MutableMapping from http import HTTPStatus -from typing import Any, BinaryIO, Generic, MutableMapping, Optional, Tuple, TypeVar, Literal +from typing import BinaryIO, Generic, Optional, TypeVar, Literal from attrs import define @@ -13,7 +15,7 @@ class Unset: UNSET: Unset = Unset() {# Used as `FileProperty._json_type_string` #} -FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]] +FileJsonType = tuple[Optional[str], BinaryIO, Optional[str]] @define @@ -42,4 +44,4 @@ class Response(Generic[T]): parsed: Optional[T] -__all__ = ["File", "Response", "FileJsonType", "Unset", "UNSET"] +__all__ = ["UNSET", "File", "FileJsonType", "Response", "Unset"] diff --git a/openapi_python_client/utils.py b/openapi_python_client/utils.py index 22a7bcfa8..15e8c9eec 100644 --- a/openapi_python_client/utils.py +++ b/openapi_python_client/utils.py @@ -57,7 +57,6 @@ def split_words(value: str) -> list[str]: RESERVED_WORDS = (set(dir(builtins)) | {"self", "true", "false", "datetime"}) - { - "type", "id", } diff --git a/poetry.lock b/poetry.lock index 319c4862d..1b4fde906 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "annotated-types" @@ -13,65 +13,65 @@ files = [ [[package]] name = "anyio" -version = "4.6.2.post1" +version = "4.8.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" files = [ - {file = "anyio-4.6.2.post1-py3-none-any.whl", hash = "sha256:6d170c36fba3bdd840c73d3868c1e777e33676a69c3a72cf0a0d5d6d8009b61d"}, - {file = "anyio-4.6.2.post1.tar.gz", hash = "sha256:4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c"}, + {file = "anyio-4.8.0-py3-none-any.whl", hash = "sha256:b5011f270ab5eb0abf13385f851315585cc37ef330dd88e27ec3d34d651fd47a"}, + {file = "anyio-4.8.0.tar.gz", hash = "sha256:1d9fe889df5212298c0c0723fa20479d1b94883a2df44bd3897aa91083316f7a"}, ] [package.dependencies] exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" -typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} +typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] -doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"] +doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"] trio = ["trio (>=0.26.1)"] [[package]] name = "attrs" -version = "24.2.0" +version = "24.3.0" description = "Classes Without Boilerplate" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2"}, - {file = "attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"}, + {file = "attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308"}, + {file = "attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff"}, ] [package.extras] benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] [[package]] name = "certifi" -version = "2024.8.30" +version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, - {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, + {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, + {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, ] [[package]] name = "click" -version = "8.1.7" +version = "8.1.8" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, + {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, + {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, ] [package.dependencies] @@ -90,73 +90,73 @@ files = [ [[package]] name = "coverage" -version = "7.6.7" +version = "7.6.10" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.9" files = [ - {file = "coverage-7.6.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:108bb458827765d538abcbf8288599fee07d2743357bdd9b9dad456c287e121e"}, - {file = "coverage-7.6.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c973b2fe4dc445cb865ab369df7521df9c27bf40715c837a113edaa2aa9faf45"}, - {file = "coverage-7.6.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c6b24007c4bcd0b19fac25763a7cac5035c735ae017e9a349b927cfc88f31c1"}, - {file = "coverage-7.6.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:acbb8af78f8f91b3b51f58f288c0994ba63c646bc1a8a22ad072e4e7e0a49f1c"}, - {file = "coverage-7.6.7-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad32a981bcdedb8d2ace03b05e4fd8dace8901eec64a532b00b15217d3677dd2"}, - {file = "coverage-7.6.7-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:34d23e28ccb26236718a3a78ba72744212aa383141961dd6825f6595005c8b06"}, - {file = "coverage-7.6.7-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e25bacb53a8c7325e34d45dddd2f2fbae0dbc230d0e2642e264a64e17322a777"}, - {file = "coverage-7.6.7-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:af05bbba896c4472a29408455fe31b3797b4d8648ed0a2ccac03e074a77e2314"}, - {file = "coverage-7.6.7-cp310-cp310-win32.whl", hash = "sha256:796c9b107d11d2d69e1849b2dfe41730134b526a49d3acb98ca02f4985eeff7a"}, - {file = "coverage-7.6.7-cp310-cp310-win_amd64.whl", hash = "sha256:987a8e3da7da4eed10a20491cf790589a8e5e07656b6dc22d3814c4d88faf163"}, - {file = "coverage-7.6.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7e61b0e77ff4dddebb35a0e8bb5a68bf0f8b872407d8d9f0c726b65dfabe2469"}, - {file = "coverage-7.6.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1a5407a75ca4abc20d6252efeb238377a71ce7bda849c26c7a9bece8680a5d99"}, - {file = "coverage-7.6.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df002e59f2d29e889c37abd0b9ee0d0e6e38c24f5f55d71ff0e09e3412a340ec"}, - {file = "coverage-7.6.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:673184b3156cba06154825f25af33baa2671ddae6343f23175764e65a8c4c30b"}, - {file = "coverage-7.6.7-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e69ad502f1a2243f739f5bd60565d14a278be58be4c137d90799f2c263e7049a"}, - {file = "coverage-7.6.7-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:60dcf7605c50ea72a14490d0756daffef77a5be15ed1b9fea468b1c7bda1bc3b"}, - {file = "coverage-7.6.7-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9c2eb378bebb2c8f65befcb5147877fc1c9fbc640fc0aad3add759b5df79d55d"}, - {file = "coverage-7.6.7-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3c0317288f032221d35fa4cbc35d9f4923ff0dfd176c79c9b356e8ef8ef2dff4"}, - {file = "coverage-7.6.7-cp311-cp311-win32.whl", hash = "sha256:951aade8297358f3618a6e0660dc74f6b52233c42089d28525749fc8267dccd2"}, - {file = "coverage-7.6.7-cp311-cp311-win_amd64.whl", hash = "sha256:5e444b8e88339a2a67ce07d41faabb1d60d1004820cee5a2c2b54e2d8e429a0f"}, - {file = "coverage-7.6.7-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f07ff574986bc3edb80e2c36391678a271d555f91fd1d332a1e0f4b5ea4b6ea9"}, - {file = "coverage-7.6.7-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:49ed5ee4109258973630c1f9d099c7e72c5c36605029f3a91fe9982c6076c82b"}, - {file = "coverage-7.6.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3e8796434a8106b3ac025fd15417315d7a58ee3e600ad4dbcfddc3f4b14342c"}, - {file = "coverage-7.6.7-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3b925300484a3294d1c70f6b2b810d6526f2929de954e5b6be2bf8caa1f12c1"}, - {file = "coverage-7.6.7-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c42ec2c522e3ddd683dec5cdce8e62817afb648caedad9da725001fa530d354"}, - {file = "coverage-7.6.7-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0266b62cbea568bd5e93a4da364d05de422110cbed5056d69339bd5af5685433"}, - {file = "coverage-7.6.7-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e5f2a0f161d126ccc7038f1f3029184dbdf8f018230af17ef6fd6a707a5b881f"}, - {file = "coverage-7.6.7-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c132b5a22821f9b143f87446805e13580b67c670a548b96da945a8f6b4f2efbb"}, - {file = "coverage-7.6.7-cp312-cp312-win32.whl", hash = "sha256:7c07de0d2a110f02af30883cd7dddbe704887617d5c27cf373362667445a4c76"}, - {file = "coverage-7.6.7-cp312-cp312-win_amd64.whl", hash = "sha256:fd49c01e5057a451c30c9b892948976f5d38f2cbd04dc556a82743ba8e27ed8c"}, - {file = "coverage-7.6.7-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:46f21663e358beae6b368429ffadf14ed0a329996248a847a4322fb2e35d64d3"}, - {file = "coverage-7.6.7-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:40cca284c7c310d622a1677f105e8507441d1bb7c226f41978ba7c86979609ab"}, - {file = "coverage-7.6.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77256ad2345c29fe59ae861aa11cfc74579c88d4e8dbf121cbe46b8e32aec808"}, - {file = "coverage-7.6.7-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87ea64b9fa52bf395272e54020537990a28078478167ade6c61da7ac04dc14bc"}, - {file = "coverage-7.6.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d608a7808793e3615e54e9267519351c3ae204a6d85764d8337bd95993581a8"}, - {file = "coverage-7.6.7-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdd94501d65adc5c24f8a1a0eda110452ba62b3f4aeaba01e021c1ed9cb8f34a"}, - {file = "coverage-7.6.7-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:82c809a62e953867cf57e0548c2b8464207f5f3a6ff0e1e961683e79b89f2c55"}, - {file = "coverage-7.6.7-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bb684694e99d0b791a43e9fc0fa58efc15ec357ac48d25b619f207c41f2fd384"}, - {file = "coverage-7.6.7-cp313-cp313-win32.whl", hash = "sha256:963e4a08cbb0af6623e61492c0ec4c0ec5c5cf74db5f6564f98248d27ee57d30"}, - {file = "coverage-7.6.7-cp313-cp313-win_amd64.whl", hash = "sha256:14045b8bfd5909196a90da145a37f9d335a5d988a83db34e80f41e965fb7cb42"}, - {file = "coverage-7.6.7-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:f2c7a045eef561e9544359a0bf5784b44e55cefc7261a20e730baa9220c83413"}, - {file = "coverage-7.6.7-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5dd4e4a49d9c72a38d18d641135d2fb0bdf7b726ca60a103836b3d00a1182acd"}, - {file = "coverage-7.6.7-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c95e0fa3d1547cb6f021ab72f5c23402da2358beec0a8e6d19a368bd7b0fb37"}, - {file = "coverage-7.6.7-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f63e21ed474edd23f7501f89b53280014436e383a14b9bd77a648366c81dce7b"}, - {file = "coverage-7.6.7-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ead9b9605c54d15be228687552916c89c9683c215370c4a44f1f217d2adcc34d"}, - {file = "coverage-7.6.7-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:0573f5cbf39114270842d01872952d301027d2d6e2d84013f30966313cadb529"}, - {file = "coverage-7.6.7-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:e2c8e3384c12dfa19fa9a52f23eb091a8fad93b5b81a41b14c17c78e23dd1d8b"}, - {file = "coverage-7.6.7-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:70a56a2ec1869e6e9fa69ef6b76b1a8a7ef709972b9cc473f9ce9d26b5997ce3"}, - {file = "coverage-7.6.7-cp313-cp313t-win32.whl", hash = "sha256:dbba8210f5067398b2c4d96b4e64d8fb943644d5eb70be0d989067c8ca40c0f8"}, - {file = "coverage-7.6.7-cp313-cp313t-win_amd64.whl", hash = "sha256:dfd14bcae0c94004baba5184d1c935ae0d1231b8409eb6c103a5fd75e8ecdc56"}, - {file = "coverage-7.6.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:37a15573f988b67f7348916077c6d8ad43adb75e478d0910957394df397d2874"}, - {file = "coverage-7.6.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b6cce5c76985f81da3769c52203ee94722cd5d5889731cd70d31fee939b74bf0"}, - {file = "coverage-7.6.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1ab9763d291a17b527ac6fd11d1a9a9c358280adb320e9c2672a97af346ac2c"}, - {file = "coverage-7.6.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6cf96ceaa275f071f1bea3067f8fd43bec184a25a962c754024c973af871e1b7"}, - {file = "coverage-7.6.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aee9cf6b0134d6f932d219ce253ef0e624f4fa588ee64830fcba193269e4daa3"}, - {file = "coverage-7.6.7-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2bc3e45c16564cc72de09e37413262b9f99167803e5e48c6156bccdfb22c8327"}, - {file = "coverage-7.6.7-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:623e6965dcf4e28a3debaa6fcf4b99ee06d27218f46d43befe4db1c70841551c"}, - {file = "coverage-7.6.7-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:850cfd2d6fc26f8346f422920ac204e1d28814e32e3a58c19c91980fa74d8289"}, - {file = "coverage-7.6.7-cp39-cp39-win32.whl", hash = "sha256:c296263093f099da4f51b3dff1eff5d4959b527d4f2f419e16508c5da9e15e8c"}, - {file = "coverage-7.6.7-cp39-cp39-win_amd64.whl", hash = "sha256:90746521206c88bdb305a4bf3342b1b7316ab80f804d40c536fc7d329301ee13"}, - {file = "coverage-7.6.7-pp39.pp310-none-any.whl", hash = "sha256:0ddcb70b3a3a57581b450571b31cb774f23eb9519c2aaa6176d3a84c9fc57671"}, - {file = "coverage-7.6.7.tar.gz", hash = "sha256:d79d4826e41441c9a118ff045e4bccb9fdbdcb1d02413e7ea6eb5c87b5439d24"}, + {file = "coverage-7.6.10-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5c912978f7fbf47ef99cec50c4401340436d200d41d714c7a4766f377c5b7b78"}, + {file = "coverage-7.6.10-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a01ec4af7dfeb96ff0078ad9a48810bb0cc8abcb0115180c6013a6b26237626c"}, + {file = "coverage-7.6.10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a3b204c11e2b2d883946fe1d97f89403aa1811df28ce0447439178cc7463448a"}, + {file = "coverage-7.6.10-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:32ee6d8491fcfc82652a37109f69dee9a830e9379166cb73c16d8dc5c2915165"}, + {file = "coverage-7.6.10-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:675cefc4c06e3b4c876b85bfb7c59c5e2218167bbd4da5075cbe3b5790a28988"}, + {file = "coverage-7.6.10-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f4f620668dbc6f5e909a0946a877310fb3d57aea8198bde792aae369ee1c23b5"}, + {file = "coverage-7.6.10-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:4eea95ef275de7abaef630c9b2c002ffbc01918b726a39f5a4353916ec72d2f3"}, + {file = "coverage-7.6.10-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e2f0280519e42b0a17550072861e0bc8a80a0870de260f9796157d3fca2733c5"}, + {file = "coverage-7.6.10-cp310-cp310-win32.whl", hash = "sha256:bc67deb76bc3717f22e765ab3e07ee9c7a5e26b9019ca19a3b063d9f4b874244"}, + {file = "coverage-7.6.10-cp310-cp310-win_amd64.whl", hash = "sha256:0f460286cb94036455e703c66988851d970fdfd8acc2a1122ab7f4f904e4029e"}, + {file = "coverage-7.6.10-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ea3c8f04b3e4af80e17bab607c386a830ffc2fb88a5484e1df756478cf70d1d3"}, + {file = "coverage-7.6.10-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:507a20fc863cae1d5720797761b42d2d87a04b3e5aeb682ef3b7332e90598f43"}, + {file = "coverage-7.6.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d37a84878285b903c0fe21ac8794c6dab58150e9359f1aaebbeddd6412d53132"}, + {file = "coverage-7.6.10-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a534738b47b0de1995f85f582d983d94031dffb48ab86c95bdf88dc62212142f"}, + {file = "coverage-7.6.10-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d7a2bf79378d8fb8afaa994f91bfd8215134f8631d27eba3e0e2c13546ce994"}, + {file = "coverage-7.6.10-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6713ba4b4ebc330f3def51df1d5d38fad60b66720948112f114968feb52d3f99"}, + {file = "coverage-7.6.10-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ab32947f481f7e8c763fa2c92fd9f44eeb143e7610c4ca9ecd6a36adab4081bd"}, + {file = "coverage-7.6.10-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7bbd8c8f1b115b892e34ba66a097b915d3871db7ce0e6b9901f462ff3a975377"}, + {file = "coverage-7.6.10-cp311-cp311-win32.whl", hash = "sha256:299e91b274c5c9cdb64cbdf1b3e4a8fe538a7a86acdd08fae52301b28ba297f8"}, + {file = "coverage-7.6.10-cp311-cp311-win_amd64.whl", hash = "sha256:489a01f94aa581dbd961f306e37d75d4ba16104bbfa2b0edb21d29b73be83609"}, + {file = "coverage-7.6.10-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:27c6e64726b307782fa5cbe531e7647aee385a29b2107cd87ba7c0105a5d3853"}, + {file = "coverage-7.6.10-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c56e097019e72c373bae32d946ecf9858fda841e48d82df7e81c63ac25554078"}, + {file = "coverage-7.6.10-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7827a5bc7bdb197b9e066cdf650b2887597ad124dd99777332776f7b7c7d0d0"}, + {file = "coverage-7.6.10-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:204a8238afe787323a8b47d8be4df89772d5c1e4651b9ffa808552bdf20e1d50"}, + {file = "coverage-7.6.10-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e67926f51821b8e9deb6426ff3164870976fe414d033ad90ea75e7ed0c2e5022"}, + {file = "coverage-7.6.10-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e78b270eadb5702938c3dbe9367f878249b5ef9a2fcc5360ac7bff694310d17b"}, + {file = "coverage-7.6.10-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:714f942b9c15c3a7a5fe6876ce30af831c2ad4ce902410b7466b662358c852c0"}, + {file = "coverage-7.6.10-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:abb02e2f5a3187b2ac4cd46b8ced85a0858230b577ccb2c62c81482ca7d18852"}, + {file = "coverage-7.6.10-cp312-cp312-win32.whl", hash = "sha256:55b201b97286cf61f5e76063f9e2a1d8d2972fc2fcfd2c1272530172fd28c359"}, + {file = "coverage-7.6.10-cp312-cp312-win_amd64.whl", hash = "sha256:e4ae5ac5e0d1e4edfc9b4b57b4cbecd5bc266a6915c500f358817a8496739247"}, + {file = "coverage-7.6.10-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:05fca8ba6a87aabdd2d30d0b6c838b50510b56cdcfc604d40760dae7153b73d9"}, + {file = "coverage-7.6.10-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9e80eba8801c386f72e0712a0453431259c45c3249f0009aff537a517b52942b"}, + {file = "coverage-7.6.10-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a372c89c939d57abe09e08c0578c1d212e7a678135d53aa16eec4430adc5e690"}, + {file = "coverage-7.6.10-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ec22b5e7fe7a0fa8509181c4aac1db48f3dd4d3a566131b313d1efc102892c18"}, + {file = "coverage-7.6.10-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26bcf5c4df41cad1b19c84af71c22cbc9ea9a547fc973f1f2cc9a290002c8b3c"}, + {file = "coverage-7.6.10-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4e4630c26b6084c9b3cb53b15bd488f30ceb50b73c35c5ad7871b869cb7365fd"}, + {file = "coverage-7.6.10-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2396e8116db77789f819d2bc8a7e200232b7a282c66e0ae2d2cd84581a89757e"}, + {file = "coverage-7.6.10-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:79109c70cc0882e4d2d002fe69a24aa504dec0cc17169b3c7f41a1d341a73694"}, + {file = "coverage-7.6.10-cp313-cp313-win32.whl", hash = "sha256:9e1747bab246d6ff2c4f28b4d186b205adced9f7bd9dc362051cc37c4a0c7bd6"}, + {file = "coverage-7.6.10-cp313-cp313-win_amd64.whl", hash = "sha256:254f1a3b1eef5f7ed23ef265eaa89c65c8c5b6b257327c149db1ca9d4a35f25e"}, + {file = "coverage-7.6.10-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:2ccf240eb719789cedbb9fd1338055de2761088202a9a0b73032857e53f612fe"}, + {file = "coverage-7.6.10-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:0c807ca74d5a5e64427c8805de15b9ca140bba13572d6d74e262f46f50b13273"}, + {file = "coverage-7.6.10-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2bcfa46d7709b5a7ffe089075799b902020b62e7ee56ebaed2f4bdac04c508d8"}, + {file = "coverage-7.6.10-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e0de1e902669dccbf80b0415fb6b43d27edca2fbd48c74da378923b05316098"}, + {file = "coverage-7.6.10-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f7b444c42bbc533aaae6b5a2166fd1a797cdb5eb58ee51a92bee1eb94a1e1cb"}, + {file = "coverage-7.6.10-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:b330368cb99ef72fcd2dc3ed260adf67b31499584dc8a20225e85bfe6f6cfed0"}, + {file = "coverage-7.6.10-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:9a7cfb50515f87f7ed30bc882f68812fd98bc2852957df69f3003d22a2aa0abf"}, + {file = "coverage-7.6.10-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6f93531882a5f68c28090f901b1d135de61b56331bba82028489bc51bdd818d2"}, + {file = "coverage-7.6.10-cp313-cp313t-win32.whl", hash = "sha256:89d76815a26197c858f53c7f6a656686ec392b25991f9e409bcef020cd532312"}, + {file = "coverage-7.6.10-cp313-cp313t-win_amd64.whl", hash = "sha256:54a5f0f43950a36312155dae55c505a76cd7f2b12d26abeebbe7a0b36dbc868d"}, + {file = "coverage-7.6.10-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:656c82b8a0ead8bba147de9a89bda95064874c91a3ed43a00e687f23cc19d53a"}, + {file = "coverage-7.6.10-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ccc2b70a7ed475c68ceb548bf69cec1e27305c1c2606a5eb7c3afff56a1b3b27"}, + {file = "coverage-7.6.10-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5e37dc41d57ceba70956fa2fc5b63c26dba863c946ace9705f8eca99daecdc4"}, + {file = "coverage-7.6.10-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0aa9692b4fdd83a4647eeb7db46410ea1322b5ed94cd1715ef09d1d5922ba87f"}, + {file = "coverage-7.6.10-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa744da1820678b475e4ba3dfd994c321c5b13381d1041fe9c608620e6676e25"}, + {file = "coverage-7.6.10-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:c0b1818063dc9e9d838c09e3a473c1422f517889436dd980f5d721899e66f315"}, + {file = "coverage-7.6.10-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:59af35558ba08b758aec4d56182b222976330ef8d2feacbb93964f576a7e7a90"}, + {file = "coverage-7.6.10-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7ed2f37cfce1ce101e6dffdfd1c99e729dd2ffc291d02d3e2d0af8b53d13840d"}, + {file = "coverage-7.6.10-cp39-cp39-win32.whl", hash = "sha256:4bcc276261505d82f0ad426870c3b12cb177752834a633e737ec5ee79bbdff18"}, + {file = "coverage-7.6.10-cp39-cp39-win_amd64.whl", hash = "sha256:457574f4599d2b00f7f637a0700a6422243b3565509457b2dbd3f50703e11f59"}, + {file = "coverage-7.6.10-pp39.pp310-none-any.whl", hash = "sha256:fd34e7b3405f0cc7ab03d54a334c17a9e802897580d964bd8c2001f4b9fd488f"}, + {file = "coverage-7.6.10.tar.gz", hash = "sha256:7fb105327c8f8f0682e29843e2ff96af9dcbe5bab8eeb4b398c6a33a16d80a23"}, ] [package.dependencies] @@ -263,13 +263,13 @@ files = [ [[package]] name = "jinja2" -version = "3.1.4" +version = "3.1.5" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, - {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, + {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, + {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, ] [package.dependencies] @@ -396,49 +396,55 @@ files = [ [[package]] name = "mypy" -version = "1.13.0" +version = "1.14.1" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6607e0f1dd1fb7f0aca14d936d13fd19eba5e17e1cd2a14f808fa5f8f6d8f60a"}, - {file = "mypy-1.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8a21be69bd26fa81b1f80a61ee7ab05b076c674d9b18fb56239d72e21d9f4c80"}, - {file = "mypy-1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7b2353a44d2179846a096e25691d54d59904559f4232519d420d64da6828a3a7"}, - {file = "mypy-1.13.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0730d1c6a2739d4511dc4253f8274cdd140c55c32dfb0a4cf8b7a43f40abfa6f"}, - {file = "mypy-1.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:c5fc54dbb712ff5e5a0fca797e6e0aa25726c7e72c6a5850cfd2adbc1eb0a372"}, - {file = "mypy-1.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:581665e6f3a8a9078f28d5502f4c334c0c8d802ef55ea0e7276a6e409bc0d82d"}, - {file = "mypy-1.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3ddb5b9bf82e05cc9a627e84707b528e5c7caaa1c55c69e175abb15a761cec2d"}, - {file = "mypy-1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20c7ee0bc0d5a9595c46f38beb04201f2620065a93755704e141fcac9f59db2b"}, - {file = "mypy-1.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3790ded76f0b34bc9c8ba4def8f919dd6a46db0f5a6610fb994fe8efdd447f73"}, - {file = "mypy-1.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:51f869f4b6b538229c1d1bcc1dd7d119817206e2bc54e8e374b3dfa202defcca"}, - {file = "mypy-1.13.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5c7051a3461ae84dfb5dd15eff5094640c61c5f22257c8b766794e6dd85e72d5"}, - {file = "mypy-1.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:39bb21c69a5d6342f4ce526e4584bc5c197fd20a60d14a8624d8743fffb9472e"}, - {file = "mypy-1.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:164f28cb9d6367439031f4c81e84d3ccaa1e19232d9d05d37cb0bd880d3f93c2"}, - {file = "mypy-1.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a4c1bfcdbce96ff5d96fc9b08e3831acb30dc44ab02671eca5953eadad07d6d0"}, - {file = "mypy-1.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:a0affb3a79a256b4183ba09811e3577c5163ed06685e4d4b46429a271ba174d2"}, - {file = "mypy-1.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a7b44178c9760ce1a43f544e595d35ed61ac2c3de306599fa59b38a6048e1aa7"}, - {file = "mypy-1.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d5092efb8516d08440e36626f0153b5006d4088c1d663d88bf79625af3d1d62"}, - {file = "mypy-1.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2904956dac40ced10931ac967ae63c5089bd498542194b436eb097a9f77bc8"}, - {file = "mypy-1.13.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:7bfd8836970d33c2105562650656b6846149374dc8ed77d98424b40b09340ba7"}, - {file = "mypy-1.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:9f73dba9ec77acb86457a8fc04b5239822df0c14a082564737833d2963677dbc"}, - {file = "mypy-1.13.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:100fac22ce82925f676a734af0db922ecfea991e1d7ec0ceb1e115ebe501301a"}, - {file = "mypy-1.13.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7bcb0bb7f42a978bb323a7c88f1081d1b5dee77ca86f4100735a6f541299d8fb"}, - {file = "mypy-1.13.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bde31fc887c213e223bbfc34328070996061b0833b0a4cfec53745ed61f3519b"}, - {file = "mypy-1.13.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:07de989f89786f62b937851295ed62e51774722e5444a27cecca993fc3f9cd74"}, - {file = "mypy-1.13.0-cp38-cp38-win_amd64.whl", hash = "sha256:4bde84334fbe19bad704b3f5b78c4abd35ff1026f8ba72b29de70dda0916beb6"}, - {file = "mypy-1.13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0246bcb1b5de7f08f2826451abd947bf656945209b140d16ed317f65a17dc7dc"}, - {file = "mypy-1.13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7f5b7deae912cf8b77e990b9280f170381fdfbddf61b4ef80927edd813163732"}, - {file = "mypy-1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7029881ec6ffb8bc233a4fa364736789582c738217b133f1b55967115288a2bc"}, - {file = "mypy-1.13.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3e38b980e5681f28f033f3be86b099a247b13c491f14bb8b1e1e134d23bb599d"}, - {file = "mypy-1.13.0-cp39-cp39-win_amd64.whl", hash = "sha256:a6789be98a2017c912ae6ccb77ea553bbaf13d27605d2ca20a76dfbced631b24"}, - {file = "mypy-1.13.0-py3-none-any.whl", hash = "sha256:9c250883f9fd81d212e0952c92dbfcc96fc237f4b7c92f56ac81fd48460b3e5a"}, - {file = "mypy-1.13.0.tar.gz", hash = "sha256:0291a61b6fbf3e6673e3405cfcc0e7650bebc7939659fdca2702958038bd835e"}, + {file = "mypy-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52686e37cf13d559f668aa398dd7ddf1f92c5d613e4f8cb262be2fb4fedb0fcb"}, + {file = "mypy-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fb545ca340537d4b45d3eecdb3def05e913299ca72c290326be19b3804b39c0"}, + {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90716d8b2d1f4cd503309788e51366f07c56635a3309b0f6a32547eaaa36a64d"}, + {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2ae753f5c9fef278bcf12e1a564351764f2a6da579d4a81347e1d5a15819997b"}, + {file = "mypy-1.14.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e0fe0f5feaafcb04505bcf439e991c6d8f1bf8b15f12b05feeed96e9e7bf1427"}, + {file = "mypy-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:7d54bd85b925e501c555a3227f3ec0cfc54ee8b6930bd6141ec872d1c572f81f"}, + {file = "mypy-1.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f995e511de847791c3b11ed90084a7a0aafdc074ab88c5a9711622fe4751138c"}, + {file = "mypy-1.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d64169ec3b8461311f8ce2fd2eb5d33e2d0f2c7b49116259c51d0d96edee48d1"}, + {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ba24549de7b89b6381b91fbc068d798192b1b5201987070319889e93038967a8"}, + {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:183cf0a45457d28ff9d758730cd0210419ac27d4d3f285beda038c9083363b1f"}, + {file = "mypy-1.14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f2a0ecc86378f45347f586e4163d1769dd81c5a223d577fe351f26b179e148b1"}, + {file = "mypy-1.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:ad3301ebebec9e8ee7135d8e3109ca76c23752bac1e717bc84cd3836b4bf3eae"}, + {file = "mypy-1.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:30ff5ef8519bbc2e18b3b54521ec319513a26f1bba19a7582e7b1f58a6e69f14"}, + {file = "mypy-1.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cb9f255c18052343c70234907e2e532bc7e55a62565d64536dbc7706a20b78b9"}, + {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b4e3413e0bddea671012b063e27591b953d653209e7a4fa5e48759cda77ca11"}, + {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:553c293b1fbdebb6c3c4030589dab9fafb6dfa768995a453d8a5d3b23784af2e"}, + {file = "mypy-1.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fad79bfe3b65fe6a1efaed97b445c3d37f7be9fdc348bdb2d7cac75579607c89"}, + {file = "mypy-1.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:8fa2220e54d2946e94ab6dbb3ba0a992795bd68b16dc852db33028df2b00191b"}, + {file = "mypy-1.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:92c3ed5afb06c3a8e188cb5da4984cab9ec9a77ba956ee419c68a388b4595255"}, + {file = "mypy-1.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dbec574648b3e25f43d23577309b16534431db4ddc09fda50841f1e34e64ed34"}, + {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8c6d94b16d62eb3e947281aa7347d78236688e21081f11de976376cf010eb31a"}, + {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d4b19b03fdf54f3c5b2fa474c56b4c13c9dbfb9a2db4370ede7ec11a2c5927d9"}, + {file = "mypy-1.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0c911fde686394753fff899c409fd4e16e9b294c24bfd5e1ea4675deae1ac6fd"}, + {file = "mypy-1.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:8b21525cb51671219f5307be85f7e646a153e5acc656e5cebf64bfa076c50107"}, + {file = "mypy-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7084fb8f1128c76cd9cf68fe5971b37072598e7c31b2f9f95586b65c741a9d31"}, + {file = "mypy-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f845a00b4f420f693f870eaee5f3e2692fa84cc8514496114649cfa8fd5e2c6"}, + {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:44bf464499f0e3a2d14d58b54674dee25c031703b2ffc35064bd0df2e0fac319"}, + {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c99f27732c0b7dc847adb21c9d47ce57eb48fa33a17bc6d7d5c5e9f9e7ae5bac"}, + {file = "mypy-1.14.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:bce23c7377b43602baa0bd22ea3265c49b9ff0b76eb315d6c34721af4cdf1d9b"}, + {file = "mypy-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:8edc07eeade7ebc771ff9cf6b211b9a7d93687ff892150cb5692e4f4272b0837"}, + {file = "mypy-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3888a1816d69f7ab92092f785a462944b3ca16d7c470d564165fe703b0970c35"}, + {file = "mypy-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:46c756a444117c43ee984bd055db99e498bc613a70bbbc120272bd13ca579fbc"}, + {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:27fc248022907e72abfd8e22ab1f10e903915ff69961174784a3900a8cba9ad9"}, + {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:499d6a72fb7e5de92218db961f1a66d5f11783f9ae549d214617edab5d4dbdbb"}, + {file = "mypy-1.14.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:57961db9795eb566dc1d1b4e9139ebc4c6b0cb6e7254ecde69d1552bf7613f60"}, + {file = "mypy-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:07ba89fdcc9451f2ebb02853deb6aaaa3d2239a236669a63ab3801bbf923ef5c"}, + {file = "mypy-1.14.1-py3-none-any.whl", hash = "sha256:b66a60cc4073aeb8ae00057f9c1f64d49e90f918fbcef9a977eb121da8b8f1d1"}, + {file = "mypy-1.14.1.tar.gz", hash = "sha256:7ec88144fe9b510e8475ec2f5f251992690fcf89ccb4500b214b4226abcd32d6"}, ] [package.dependencies] -mypy-extensions = ">=1.0.0" +mypy_extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = ">=4.6.0" +typing_extensions = ">=4.6.0" [package.extras] dmypy = ["psutil (>=4.0)"] @@ -486,46 +492,48 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "psutil" -version = "5.9.8" +version = "6.1.1" description = "Cross-platform lib for process and system monitoring in Python." optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ - {file = "psutil-5.9.8-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:26bd09967ae00920df88e0352a91cff1a78f8d69b3ecabbfe733610c0af486c8"}, - {file = "psutil-5.9.8-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:05806de88103b25903dff19bb6692bd2e714ccf9e668d050d144012055cbca73"}, - {file = "psutil-5.9.8-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:611052c4bc70432ec770d5d54f64206aa7203a101ec273a0cd82418c86503bb7"}, - {file = "psutil-5.9.8-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:50187900d73c1381ba1454cf40308c2bf6f34268518b3f36a9b663ca87e65e36"}, - {file = "psutil-5.9.8-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:02615ed8c5ea222323408ceba16c60e99c3f91639b07da6373fb7e6539abc56d"}, - {file = "psutil-5.9.8-cp27-none-win32.whl", hash = "sha256:36f435891adb138ed3c9e58c6af3e2e6ca9ac2f365efe1f9cfef2794e6c93b4e"}, - {file = "psutil-5.9.8-cp27-none-win_amd64.whl", hash = "sha256:bd1184ceb3f87651a67b2708d4c3338e9b10c5df903f2e3776b62303b26cb631"}, - {file = "psutil-5.9.8-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:aee678c8720623dc456fa20659af736241f575d79429a0e5e9cf88ae0605cc81"}, - {file = "psutil-5.9.8-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8cb6403ce6d8e047495a701dc7c5bd788add903f8986d523e3e20b98b733e421"}, - {file = "psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d06016f7f8625a1825ba3732081d77c94589dca78b7a3fc072194851e88461a4"}, - {file = "psutil-5.9.8-cp36-cp36m-win32.whl", hash = "sha256:7d79560ad97af658a0f6adfef8b834b53f64746d45b403f225b85c5c2c140eee"}, - {file = "psutil-5.9.8-cp36-cp36m-win_amd64.whl", hash = "sha256:27cc40c3493bb10de1be4b3f07cae4c010ce715290a5be22b98493509c6299e2"}, - {file = "psutil-5.9.8-cp37-abi3-win32.whl", hash = "sha256:bc56c2a1b0d15aa3eaa5a60c9f3f8e3e565303b465dbf57a1b730e7a2b9844e0"}, - {file = "psutil-5.9.8-cp37-abi3-win_amd64.whl", hash = "sha256:8db4c1b57507eef143a15a6884ca10f7c73876cdf5d51e713151c1236a0e68cf"}, - {file = "psutil-5.9.8-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:d16bbddf0693323b8c6123dd804100241da461e41d6e332fb0ba6058f630f8c8"}, - {file = "psutil-5.9.8.tar.gz", hash = "sha256:6be126e3225486dff286a8fb9a06246a5253f4c7c53b475ea5f5ac934e64194c"}, + {file = "psutil-6.1.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:9ccc4316f24409159897799b83004cb1e24f9819b0dcf9c0b68bdcb6cefee6a8"}, + {file = "psutil-6.1.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:ca9609c77ea3b8481ab005da74ed894035936223422dc591d6772b147421f777"}, + {file = "psutil-6.1.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:8df0178ba8a9e5bc84fed9cfa61d54601b371fbec5c8eebad27575f1e105c0d4"}, + {file = "psutil-6.1.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:1924e659d6c19c647e763e78670a05dbb7feaf44a0e9c94bf9e14dfc6ba50468"}, + {file = "psutil-6.1.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:018aeae2af92d943fdf1da6b58665124897cfc94faa2ca92098838f83e1b1bca"}, + {file = "psutil-6.1.1-cp27-none-win32.whl", hash = "sha256:6d4281f5bbca041e2292be3380ec56a9413b790579b8e593b1784499d0005dac"}, + {file = "psutil-6.1.1-cp27-none-win_amd64.whl", hash = "sha256:c777eb75bb33c47377c9af68f30e9f11bc78e0f07fbf907be4a5d70b2fe5f030"}, + {file = "psutil-6.1.1-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:fc0ed7fe2231a444fc219b9c42d0376e0a9a1a72f16c5cfa0f68d19f1a0663e8"}, + {file = "psutil-6.1.1-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:0bdd4eab935276290ad3cb718e9809412895ca6b5b334f5a9111ee6d9aff9377"}, + {file = "psutil-6.1.1-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b6e06c20c05fe95a3d7302d74e7097756d4ba1247975ad6905441ae1b5b66003"}, + {file = "psutil-6.1.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97f7cb9921fbec4904f522d972f0c0e1f4fabbdd4e0287813b21215074a0f160"}, + {file = "psutil-6.1.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33431e84fee02bc84ea36d9e2c4a6d395d479c9dd9bba2376c1f6ee8f3a4e0b3"}, + {file = "psutil-6.1.1-cp36-cp36m-win32.whl", hash = "sha256:384636b1a64b47814437d1173be1427a7c83681b17a450bfc309a1953e329603"}, + {file = "psutil-6.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:8be07491f6ebe1a693f17d4f11e69d0dc1811fa082736500f649f79df7735303"}, + {file = "psutil-6.1.1-cp37-abi3-win32.whl", hash = "sha256:eaa912e0b11848c4d9279a93d7e2783df352b082f40111e078388701fd479e53"}, + {file = "psutil-6.1.1-cp37-abi3-win_amd64.whl", hash = "sha256:f35cfccb065fff93529d2afb4a2e89e363fe63ca1e4a5da22b603a85833c2649"}, + {file = "psutil-6.1.1.tar.gz", hash = "sha256:cf8496728c18f2d0b45198f06895be52f36611711746b7f30c464b422b50e2f5"}, ] [package.extras] -test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] +dev = ["abi3audit", "black", "check-manifest", "coverage", "packaging", "pylint", "pyperf", "pypinfo", "pytest-cov", "requests", "rstcheck", "ruff", "sphinx", "sphinx_rtd_theme", "toml-sort", "twine", "virtualenv", "vulture", "wheel"] +test = ["pytest", "pytest-xdist", "setuptools"] [[package]] name = "pydantic" -version = "2.10.1" +version = "2.10.4" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.10.1-py3-none-any.whl", hash = "sha256:a8d20db84de64cf4a7d59e899c2caf0fe9d660c7cfc482528e7020d7dd189a7e"}, - {file = "pydantic-2.10.1.tar.gz", hash = "sha256:a4daca2dc0aa429555e0656d6bf94873a7dc5f54ee42b1f5873d666fb3f35560"}, + {file = "pydantic-2.10.4-py3-none-any.whl", hash = "sha256:597e135ea68be3a37552fb524bc7d0d66dcf93d395acd93a00682f1efcb8ee3d"}, + {file = "pydantic-2.10.4.tar.gz", hash = "sha256:82f12e9723da6de4fe2ba888b5971157b3be7ad914267dea8f05f82b28254f06"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.27.1" +pydantic-core = "2.27.2" typing-extensions = ">=4.12.2" [package.extras] @@ -534,111 +542,111 @@ timezone = ["tzdata"] [[package]] name = "pydantic-core" -version = "2.27.1" +version = "2.27.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:71a5e35c75c021aaf400ac048dacc855f000bdfed91614b4a726f7432f1f3d6a"}, - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f82d068a2d6ecfc6e054726080af69a6764a10015467d7d7b9f66d6ed5afa23b"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:121ceb0e822f79163dd4699e4c54f5ad38b157084d97b34de8b232bcaad70278"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4603137322c18eaf2e06a4495f426aa8d8388940f3c457e7548145011bb68e05"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a33cd6ad9017bbeaa9ed78a2e0752c5e250eafb9534f308e7a5f7849b0b1bfb4"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15cc53a3179ba0fcefe1e3ae50beb2784dede4003ad2dfd24f81bba4b23a454f"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45d9c5eb9273aa50999ad6adc6be5e0ecea7e09dbd0d31bd0c65a55a2592ca08"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8bf7b66ce12a2ac52d16f776b31d16d91033150266eb796967a7e4621707e4f6"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:655d7dd86f26cb15ce8a431036f66ce0318648f8853d709b4167786ec2fa4807"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:5556470f1a2157031e676f776c2bc20acd34c1990ca5f7e56f1ebf938b9ab57c"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f69ed81ab24d5a3bd93861c8c4436f54afdf8e8cc421562b0c7504cf3be58206"}, - {file = "pydantic_core-2.27.1-cp310-none-win32.whl", hash = "sha256:f5a823165e6d04ccea61a9f0576f345f8ce40ed533013580e087bd4d7442b52c"}, - {file = "pydantic_core-2.27.1-cp310-none-win_amd64.whl", hash = "sha256:57866a76e0b3823e0b56692d1a0bf722bffb324839bb5b7226a7dbd6c9a40b17"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ac3b20653bdbe160febbea8aa6c079d3df19310d50ac314911ed8cc4eb7f8cb8"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a5a8e19d7c707c4cadb8c18f5f60c843052ae83c20fa7d44f41594c644a1d330"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f7059ca8d64fea7f238994c97d91f75965216bcbe5f695bb44f354893f11d52"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bed0f8a0eeea9fb72937ba118f9db0cb7e90773462af7962d382445f3005e5a4"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3cb37038123447cf0f3ea4c74751f6a9d7afef0eb71aa07bf5f652b5e6a132c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84286494f6c5d05243456e04223d5a9417d7f443c3b76065e75001beb26f88de"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acc07b2cfc5b835444b44a9956846b578d27beeacd4b52e45489e93276241025"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4fefee876e07a6e9aad7a8c8c9f85b0cdbe7df52b8a9552307b09050f7512c7e"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:258c57abf1188926c774a4c94dd29237e77eda19462e5bb901d88adcab6af919"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:35c14ac45fcfdf7167ca76cc80b2001205a8d5d16d80524e13508371fb8cdd9c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d1b26e1dff225c31897696cab7d4f0a315d4c0d9e8666dbffdb28216f3b17fdc"}, - {file = "pydantic_core-2.27.1-cp311-none-win32.whl", hash = "sha256:2cdf7d86886bc6982354862204ae3b2f7f96f21a3eb0ba5ca0ac42c7b38598b9"}, - {file = "pydantic_core-2.27.1-cp311-none-win_amd64.whl", hash = "sha256:3af385b0cee8df3746c3f406f38bcbfdc9041b5c2d5ce3e5fc6637256e60bbc5"}, - {file = "pydantic_core-2.27.1-cp311-none-win_arm64.whl", hash = "sha256:81f2ec23ddc1b476ff96563f2e8d723830b06dceae348ce02914a37cb4e74b89"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9cbd94fc661d2bab2bc702cddd2d3370bbdcc4cd0f8f57488a81bcce90c7a54f"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5f8c4718cd44ec1580e180cb739713ecda2bdee1341084c1467802a417fe0f02"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15aae984e46de8d376df515f00450d1522077254ef6b7ce189b38ecee7c9677c"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ba5e3963344ff25fc8c40da90f44b0afca8cfd89d12964feb79ac1411a260ac"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:992cea5f4f3b29d6b4f7f1726ed8ee46c8331c6b4eed6db5b40134c6fe1768bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0325336f348dbee6550d129b1627cb8f5351a9dc91aad141ffb96d4937bd9529"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7597c07fbd11515f654d6ece3d0e4e5093edc30a436c63142d9a4b8e22f19c35"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3bbd5d8cc692616d5ef6fbbbd50dbec142c7e6ad9beb66b78a96e9c16729b089"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:dc61505e73298a84a2f317255fcc72b710b72980f3a1f670447a21efc88f8381"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:e1f735dc43da318cad19b4173dd1ffce1d84aafd6c9b782b3abc04a0d5a6f5bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f4e5658dbffe8843a0f12366a4c2d1c316dbe09bb4dfbdc9d2d9cd6031de8aae"}, - {file = "pydantic_core-2.27.1-cp312-none-win32.whl", hash = "sha256:672ebbe820bb37988c4d136eca2652ee114992d5d41c7e4858cdd90ea94ffe5c"}, - {file = "pydantic_core-2.27.1-cp312-none-win_amd64.whl", hash = "sha256:66ff044fd0bb1768688aecbe28b6190f6e799349221fb0de0e6f4048eca14c16"}, - {file = "pydantic_core-2.27.1-cp312-none-win_arm64.whl", hash = "sha256:9a3b0793b1bbfd4146304e23d90045f2a9b5fd5823aa682665fbdaf2a6c28f3e"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f216dbce0e60e4d03e0c4353c7023b202d95cbaeff12e5fd2e82ea0a66905073"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a2e02889071850bbfd36b56fd6bc98945e23670773bc7a76657e90e6b6603c08"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42b0e23f119b2b456d07ca91b307ae167cc3f6c846a7b169fca5326e32fdc6cf"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:764be71193f87d460a03f1f7385a82e226639732214b402f9aa61f0d025f0737"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c00666a3bd2f84920a4e94434f5974d7bbc57e461318d6bb34ce9cdbbc1f6b2"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ccaa88b24eebc0f849ce0a4d09e8a408ec5a94afff395eb69baf868f5183107"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c65af9088ac534313e1963443d0ec360bb2b9cba6c2909478d22c2e363d98a51"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:206b5cf6f0c513baffaeae7bd817717140770c74528f3e4c3e1cec7871ddd61a"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:062f60e512fc7fff8b8a9d680ff0ddaaef0193dba9fa83e679c0c5f5fbd018bc"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:a0697803ed7d4af5e4c1adf1670af078f8fcab7a86350e969f454daf598c4960"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:58ca98a950171f3151c603aeea9303ef6c235f692fe555e883591103da709b23"}, - {file = "pydantic_core-2.27.1-cp313-none-win32.whl", hash = "sha256:8065914ff79f7eab1599bd80406681f0ad08f8e47c880f17b416c9f8f7a26d05"}, - {file = "pydantic_core-2.27.1-cp313-none-win_amd64.whl", hash = "sha256:ba630d5e3db74c79300d9a5bdaaf6200172b107f263c98a0539eeecb857b2337"}, - {file = "pydantic_core-2.27.1-cp313-none-win_arm64.whl", hash = "sha256:45cf8588c066860b623cd11c4ba687f8d7175d5f7ef65f7129df8a394c502de5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:5897bec80a09b4084aee23f9b73a9477a46c3304ad1d2d07acca19723fb1de62"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d0165ab2914379bd56908c02294ed8405c252250668ebcb438a55494c69f44ab"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b9af86e1d8e4cfc82c2022bfaa6f459381a50b94a29e95dcdda8442d6d83864"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f6c8a66741c5f5447e047ab0ba7a1c61d1e95580d64bce852e3df1f895c4067"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a42d6a8156ff78981f8aa56eb6394114e0dedb217cf8b729f438f643608cbcd"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64c65f40b4cd8b0e049a8edde07e38b476da7e3aaebe63287c899d2cff253fa5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdcf339322a3fae5cbd504edcefddd5a50d9ee00d968696846f089b4432cf78"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf99c8404f008750c846cb4ac4667b798a9f7de673ff719d705d9b2d6de49c5f"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f1edcea27918d748c7e5e4d917297b2a0ab80cad10f86631e488b7cddf76a36"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:159cac0a3d096f79ab6a44d77a961917219707e2a130739c64d4dd46281f5c2a"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:029d9757eb621cc6e1848fa0b0310310de7301057f623985698ed7ebb014391b"}, - {file = "pydantic_core-2.27.1-cp38-none-win32.whl", hash = "sha256:a28af0695a45f7060e6f9b7092558a928a28553366519f64083c63a44f70e618"}, - {file = "pydantic_core-2.27.1-cp38-none-win_amd64.whl", hash = "sha256:2d4567c850905d5eaaed2f7a404e61012a51caf288292e016360aa2b96ff38d4"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:e9386266798d64eeb19dd3677051f5705bf873e98e15897ddb7d76f477131967"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4228b5b646caa73f119b1ae756216b59cc6e2267201c27d3912b592c5e323b60"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3dfe500de26c52abe0477dde16192ac39c98f05bf2d80e76102d394bd13854"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:aee66be87825cdf72ac64cb03ad4c15ffef4143dbf5c113f64a5ff4f81477bf9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b748c44bb9f53031c8cbc99a8a061bc181c1000c60a30f55393b6e9c45cc5bd"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ca038c7f6a0afd0b2448941b6ef9d5e1949e999f9e5517692eb6da58e9d44be"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e0bd57539da59a3e4671b90a502da9a28c72322a4f17866ba3ac63a82c4498e"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ac6c2c45c847bbf8f91930d88716a0fb924b51e0c6dad329b793d670ec5db792"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b94d4ba43739bbe8b0ce4262bcc3b7b9f31459ad120fb595627eaeb7f9b9ca01"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:00e6424f4b26fe82d44577b4c842d7df97c20be6439e8e685d0d715feceb9fb9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:38de0a70160dd97540335b7ad3a74571b24f1dc3ed33f815f0880682e6880131"}, - {file = "pydantic_core-2.27.1-cp39-none-win32.whl", hash = "sha256:7ccebf51efc61634f6c2344da73e366c75e735960b5654b63d7e6f69a5885fa3"}, - {file = "pydantic_core-2.27.1-cp39-none-win_amd64.whl", hash = "sha256:a57847b090d7892f123726202b7daa20df6694cbd583b67a592e856bff603d6c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3fa80ac2bd5856580e242dbc202db873c60a01b20309c8319b5c5986fbe53ce6"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d950caa237bb1954f1b8c9227b5065ba6875ac9771bb8ec790d956a699b78676"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e4216e64d203e39c62df627aa882f02a2438d18a5f21d7f721621f7a5d3611d"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02a3d637bd387c41d46b002f0e49c52642281edacd2740e5a42f7017feea3f2c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:161c27ccce13b6b0c8689418da3885d3220ed2eae2ea5e9b2f7f3d48f1d52c27"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:19910754e4cc9c63bc1c7f6d73aa1cfee82f42007e407c0f413695c2f7ed777f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:e173486019cc283dc9778315fa29a363579372fe67045e971e89b6365cc035ed"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:af52d26579b308921b73b956153066481f064875140ccd1dfd4e77db89dbb12f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:981fb88516bd1ae8b0cbbd2034678a39dedc98752f264ac9bc5839d3923fa04c"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5fde892e6c697ce3e30c61b239330fc5d569a71fefd4eb6512fc6caec9dd9e2f"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:816f5aa087094099fff7edabb5e01cc370eb21aa1a1d44fe2d2aefdfb5599b31"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c10c309e18e443ddb108f0ef64e8729363adbfd92d6d57beec680f6261556f3"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98476c98b02c8e9b2eec76ac4156fd006628b1b2d0ef27e548ffa978393fd154"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c3027001c28434e7ca5a6e1e527487051136aa81803ac812be51802150d880dd"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7699b1df36a48169cdebda7ab5a2bac265204003f153b4bd17276153d997670a"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1c39b07d90be6b48968ddc8c19e7585052088fd7ec8d568bb31ff64c70ae3c97"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:46ccfe3032b3915586e469d4972973f893c0a2bb65669194a5bdea9bacc088c2"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:62ba45e21cf6571d7f716d903b5b7b6d2617e2d5d67c0923dc47b9d41369f840"}, - {file = "pydantic_core-2.27.1.tar.gz", hash = "sha256:62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235"}, + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"}, + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7969e133a6f183be60e9f6f56bfae753585680f3b7307a8e555a948d443cc05a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3de9961f2a346257caf0aa508a4da705467f53778e9ef6fe744c038119737ef5"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e2bb4d3e5873c37bb3dd58714d4cd0b0e6238cebc4177ac8fe878f8b3aa8e74c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:280d219beebb0752699480fe8f1dc61ab6615c2046d76b7ab7ee38858de0a4e7"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47956ae78b6422cbd46f772f1746799cbb862de838fd8d1fbd34a82e05b0983a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:14d4a5c49d2f009d62a2a7140d3064f686d17a5d1a268bc641954ba181880236"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:337b443af21d488716f8d0b6164de833e788aa6bd7e3a39c005febc1284f4962"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:03d0f86ea3184a12f41a2d23f7ccb79cdb5a18e06993f8a45baa8dfec746f0e9"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7041c36f5680c6e0f08d922aed302e98b3745d97fe1589db0a3eebf6624523af"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win32.whl", hash = "sha256:50a68f3e3819077be2c98110c1f9dcb3817e93f267ba80a2c05bb4f8799e2ff4"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win_amd64.whl", hash = "sha256:e0fd26b16394ead34a424eecf8a31a1f5137094cabe84a1bcb10fa6ba39d3d31"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:8e10c99ef58cfdf2a66fc15d66b16c4a04f62bca39db589ae8cba08bc55331bc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:26f32e0adf166a84d0cb63be85c562ca8a6fa8de28e5f0d92250c6b7e9e2aff7"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c19d1ea0673cd13cc2f872f6c9ab42acc4e4f492a7ca9d3795ce2b112dd7e15"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e68c4446fe0810e959cdff46ab0a41ce2f2c86d227d96dc3847af0ba7def306"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9640b0059ff4f14d1f37321b94061c6db164fbe49b334b31643e0528d100d99"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:40d02e7d45c9f8af700f3452f329ead92da4c5f4317ca9b896de7ce7199ea459"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c1fd185014191700554795c99b347d64f2bb637966c4cfc16998a0ca700d048"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d81d2068e1c1228a565af076598f9e7451712700b673de8f502f0334f281387d"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a4207639fb02ec2dbb76227d7c751a20b1a6b4bc52850568e52260cae64ca3b"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:3de3ce3c9ddc8bbd88f6e0e304dea0e66d843ec9de1b0042b0911c1663ffd474"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:30c5f68ded0c36466acede341551106821043e9afaad516adfb6e8fa80a4e6a6"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win32.whl", hash = "sha256:c70c26d2c99f78b125a3459f8afe1aed4d9687c24fd677c6a4436bc042e50d6c"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_amd64.whl", hash = "sha256:08e125dbdc505fa69ca7d9c499639ab6407cfa909214d500897d02afb816e7cc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_arm64.whl", hash = "sha256:26f0d68d4b235a2bae0c3fc585c585b4ecc51382db0e3ba402a22cbc440915e4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9e0c8cfefa0ef83b4da9588448b6d8d2a2bf1a53c3f1ae5fca39eb3061e2f0b0"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:83097677b8e3bd7eaa6775720ec8e0405f1575015a463285a92bfdfe254529ef"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:172fce187655fece0c90d90a678424b013f8fbb0ca8b036ac266749c09438cb7"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:519f29f5213271eeeeb3093f662ba2fd512b91c5f188f3bb7b27bc5973816934"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05e3a55d124407fffba0dd6b0c0cd056d10e983ceb4e5dbd10dda135c31071d6"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c3ed807c7b91de05e63930188f19e921d1fe90de6b4f5cd43ee7fcc3525cb8c"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fb4aadc0b9a0c063206846d603b92030eb6f03069151a625667f982887153e2"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28ccb213807e037460326424ceb8b5245acb88f32f3d2777427476e1b32c48c4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:de3cd1899e2c279b140adde9357c4495ed9d47131b4a4eaff9052f23398076b3"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:220f892729375e2d736b97d0e51466252ad84c51857d4d15f5e9692f9ef12be4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a0fcd29cd6b4e74fe8ddd2c90330fd8edf2e30cb52acda47f06dd615ae72da57"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win32.whl", hash = "sha256:1e2cb691ed9834cd6a8be61228471d0a503731abfb42f82458ff27be7b2186fc"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_amd64.whl", hash = "sha256:cc3f1a99a4f4f9dd1de4fe0312c114e740b5ddead65bb4102884b384c15d8bc9"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_arm64.whl", hash = "sha256:3911ac9284cd8a1792d3cb26a2da18f3ca26c6908cc434a18f730dc0db7bfa3b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7d14bd329640e63852364c306f4d23eb744e0f8193148d4044dd3dacdaacbd8b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82f91663004eb8ed30ff478d77c4d1179b3563df6cdb15c0817cd1cdaf34d154"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71b24c7d61131bb83df10cc7e687433609963a944ccf45190cfc21e0887b08c9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa8e459d4954f608fa26116118bb67f56b93b209c39b008277ace29937453dc9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8918cbebc8da707ba805b7fd0b382816858728ae7fe19a942080c24e5b7cd1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eda3f5c2a021bbc5d976107bb302e0131351c2ba54343f8a496dc8783d3d3a6a"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd8086fa684c4775c27f03f062cbb9eaa6e17f064307e86b21b9e0abc9c0f02e"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8d9b3388db186ba0c099a6d20f0604a44eabdeef1777ddd94786cdae158729e4"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7a66efda2387de898c8f38c0cf7f14fca0b51a8ef0b24bfea5849f1b3c95af27"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:18a101c168e4e092ab40dbc2503bdc0f62010e95d292b27827871dc85450d7ee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ba5dd002f88b78a4215ed2f8ddbdf85e8513382820ba15ad5ad8955ce0ca19a1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win32.whl", hash = "sha256:1ebaf1d0481914d004a573394f4be3a7616334be70261007e47c2a6fe7e50130"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_amd64.whl", hash = "sha256:953101387ecf2f5652883208769a79e48db18c6df442568a0b5ccd8c2723abee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d3e8d504bdd3f10835468f29008d72fc8359d95c9c415ce6e767203db6127506"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521eb9b7f036c9b6187f0b47318ab0d7ca14bd87f776240b90b21c1f4f149320"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85210c4d99a0114f5a9481b44560d7d1e35e32cc5634c656bc48e590b669b145"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d716e2e30c6f140d7560ef1538953a5cd1a87264c737643d481f2779fc247fe1"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f66d89ba397d92f840f8654756196d93804278457b5fbede59598a1f9f90b228"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:669e193c1c576a58f132e3158f9dfa9662969edb1a250c54d8fa52590045f046"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdbe7629b996647b99c01b37f11170a57ae675375b14b8c13b8518b8320ced5"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d262606bf386a5ba0b0af3b97f37c83d7011439e3dc1a9298f21efb292e42f1a"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cabb9bcb7e0d97f74df8646f34fc76fbf793b7f6dc2438517d7a9e50eee4f14d"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:d2d63f1215638d28221f664596b1ccb3944f6e25dd18cd3b86b0a4c408d5ebb9"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bca101c00bff0adb45a833f8451b9105d9df18accb8743b08107d7ada14bd7da"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win32.whl", hash = "sha256:f6f8e111843bbb0dee4cb6594cdc73e79b3329b526037ec242a3e49012495b3b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win_amd64.whl", hash = "sha256:fd1aea04935a508f62e0d0ef1f5ae968774a32afc306fb8545e06f5ff5cdf3ad"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c10eb4f1659290b523af58fa7cffb452a61ad6ae5613404519aee4bfbf1df993"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef592d4bad47296fb11f96cd7dc898b92e795032b4894dfb4076cfccd43a9308"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c61709a844acc6bf0b7dce7daae75195a10aac96a596ea1b776996414791ede4"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c5f762659e47fdb7b16956c71598292f60a03aa92f8b6351504359dbdba6cf"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c9775e339e42e79ec99c441d9730fccf07414af63eac2f0e48e08fd38a64d76"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57762139821c31847cfb2df63c12f725788bd9f04bc2fb392790959b8f70f118"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d1e85068e818c73e048fe28cfc769040bb1f475524f4745a5dc621f75ac7630"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:097830ed52fd9e427942ff3b9bc17fab52913b2f50f2880dc4a5611446606a54"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:044a50963a614ecfae59bb1eaf7ea7efc4bc62f49ed594e18fa1e5d953c40e9f"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:4e0b4220ba5b40d727c7f879eac379b822eee5d8fff418e9d3381ee45b3b0362"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e4f4bb20d75e9325cc9696c6802657b58bc1dbbe3022f32cc2b2b632c3fbb96"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win32.whl", hash = "sha256:cca63613e90d001b9f2f9a9ceb276c308bfa2a43fafb75c8031c4f66039e8c6e"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win_amd64.whl", hash = "sha256:77d1bca19b0f7021b3a982e6f903dcd5b2b06076def36a652e3907f596e29f67"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2bf14caea37e91198329b828eae1618c068dfb8ef17bb33287a7ad4b61ac314e"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0cb791f5b45307caae8810c2023a184c74605ec3bcbb67d13846c28ff731ff8"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:688d3fd9fcb71f41c4c015c023d12a79d1c4c0732ec9eb35d96e3388a120dcf3"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d591580c34f4d731592f0e9fe40f9cc1b430d297eecc70b962e93c5c668f15f"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:82f986faf4e644ffc189a7f1aafc86e46ef70372bb153e7001e8afccc6e54133"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bec317a27290e2537f922639cafd54990551725fc844249e64c523301d0822fc"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:0296abcb83a797db256b773f45773da397da75a08f5fcaef41f2044adec05f50"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0d75070718e369e452075a6017fbf187f788e17ed67a3abd47fa934d001863d9"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7e17b560be3c98a8e3aa66ce828bdebb9e9ac6ad5466fba92eb74c4c95cb1151"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c33939a82924da9ed65dab5a65d427205a73181d8098e79b6b426bdf8ad4e656"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:00bad2484fa6bda1e216e7345a798bd37c68fb2d97558edd584942aa41b7d278"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817e2b40aba42bac6f457498dacabc568c3b7a986fc9ba7c8d9d260b71485fb"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:251136cdad0cb722e93732cb45ca5299fb56e1344a833640bf93b2803f8d1bfd"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2088237af596f0a524d3afc39ab3b036e8adb054ee57cbb1dcf8e09da5b29cc"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d4041c0b966a84b4ae7a09832eb691a35aec90910cd2dbe7a208de59be77965b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8083d4e875ebe0b864ffef72a4304827015cff328a1be6e22cc850753bfb122b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f141ee28a0ad2123b6611b6ceff018039df17f32ada8b534e6aa039545a3efb2"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7d0c8399fcc1848491f00e0314bd59fb34a9c008761bcb422a057670c3f65e35"}, + {file = "pydantic_core-2.27.2.tar.gz", hash = "sha256:eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39"}, ] [package.dependencies] @@ -646,13 +654,13 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pygments" -version = "2.18.0" +version = "2.19.1" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.8" files = [ - {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, - {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, + {file = "pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c"}, + {file = "pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f"}, ] [package.extras] @@ -660,13 +668,13 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pytest" -version = "8.3.3" +version = "8.3.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, - {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, + {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, + {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, ] [package.dependencies] @@ -745,13 +753,13 @@ cli = ["click (>=5.0)"] [[package]] name = "python-multipart" -version = "0.0.17" +version = "0.0.20" description = "A streaming multipart parser for Python" optional = false python-versions = ">=3.8" files = [ - {file = "python_multipart-0.0.17-py3-none-any.whl", hash = "sha256:15dc4f487e0a9476cc1201261188ee0940165cffc94429b6fc565c4d3045cb5d"}, - {file = "python_multipart-0.0.17.tar.gz", hash = "sha256:41330d831cae6e2f22902704ead2826ea038d0419530eadff3ea80175aec5538"}, + {file = "python_multipart-0.0.20-py3-none-any.whl", hash = "sha256:8a62d3a8335e06589fe01f2a3e178cdcc632f3fbe0d492ad9ee0ec35aab1f104"}, + {file = "python_multipart-0.0.20.tar.gz", hash = "sha256:8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13"}, ] [[package]] @@ -775,13 +783,13 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruamel-yaml" -version = "0.18.6" +version = "0.18.10" description = "ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order" optional = false python-versions = ">=3.7" files = [ - {file = "ruamel.yaml-0.18.6-py3-none-any.whl", hash = "sha256:57b53ba33def16c4f3d807c0ccbc00f8a6081827e81ba2491691b76882d0c636"}, - {file = "ruamel.yaml-0.18.6.tar.gz", hash = "sha256:8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b"}, + {file = "ruamel.yaml-0.18.10-py3-none-any.whl", hash = "sha256:30f22513ab2301b3d2b577adc121c6471f28734d3d9728581245f1e76468b4f1"}, + {file = "ruamel.yaml-0.18.10.tar.gz", hash = "sha256:20c86ab29ac2153f80a428e1254a8adf686d3383df04490514ca3b79a362db58"}, ] [package.dependencies] @@ -804,6 +812,7 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f66efbc1caa63c088dead1c4170d148eabc9b80d95fb75b6c92ac0aad2437d76"}, {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:22353049ba4181685023b25b5b51a574bce33e7f51c759371a7422dcae5402a6"}, {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:932205970b9f9991b34f55136be327501903f7c66830e9760a8ffb15b07f05cd"}, + {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a52d48f4e7bf9005e8f0a89209bf9a73f7190ddf0489eee5eb51377385f59f2a"}, {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-win32.whl", hash = "sha256:3eac5a91891ceb88138c113f9db04f3cebdae277f5d44eaa3651a4f573e6a5da"}, {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-win_amd64.whl", hash = "sha256:ab007f2f5a87bd08ab1499bdf96f3d5c6ad4dcfa364884cb4549aa0154b13a28"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-macosx_13_0_arm64.whl", hash = "sha256:4a6679521a58256a90b0d89e03992c15144c5f3858f40d7c18886023d7943db6"}, @@ -812,6 +821,7 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:811ea1594b8a0fb466172c384267a4e5e367298af6b228931f273b111f17ef52"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:cf12567a7b565cbf65d438dec6cfbe2917d3c1bdddfce84a9930b7d35ea59642"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7dd5adc8b930b12c8fc5b99e2d535a09889941aa0d0bd06f4749e9a9397c71d2"}, + {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1492a6051dab8d912fc2adeef0e8c72216b24d57bd896ea607cb90bb0c4981d3"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-win32.whl", hash = "sha256:bd0a08f0bab19093c54e18a14a10b4322e1eacc5217056f3c063bd2f59853ce4"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-win_amd64.whl", hash = "sha256:a274fb2cb086c7a3dea4322ec27f4cb5cc4b6298adb583ab0e211a4682f241eb"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:20b0f8dc160ba83b6dcc0e256846e1a02d044e13f7ea74a3d1d56ede4e48c632"}, @@ -820,6 +830,7 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:749c16fcc4a2b09f28843cda5a193e0283e47454b63ec4b81eaa2242f50e4ccd"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bf165fef1f223beae7333275156ab2022cffe255dcc51c27f066b4370da81e31"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:32621c177bbf782ca5a18ba4d7af0f1082a3f6e517ac2a18b3974d4edf349680"}, + {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b82a7c94a498853aa0b272fd5bc67f29008da798d4f93a2f9f289feb8426a58d"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-win32.whl", hash = "sha256:e8c4ebfcfd57177b572e2040777b8abc537cdef58a2120e830124946aa9b42c5"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-win_amd64.whl", hash = "sha256:0467c5965282c62203273b838ae77c0d29d7638c8a4e3a1c8bdd3602c10904e4"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:4c8c5d82f50bb53986a5e02d1b3092b03622c02c2eb78e29bec33fd9593bae1a"}, @@ -828,6 +839,7 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96777d473c05ee3e5e3c3e999f5d23c6f4ec5b0c38c098b3a5229085f74236c6"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:3bc2a80e6420ca8b7d3590791e2dfc709c88ab9152c00eeb511c9875ce5778bf"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:e188d2699864c11c36cdfdada94d781fd5d6b0071cd9c427bceb08ad3d7c70e1"}, + {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4f6f3eac23941b32afccc23081e1f50612bdbe4e982012ef4f5797986828cd01"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-win32.whl", hash = "sha256:6442cb36270b3afb1b4951f060eccca1ce49f3d087ca1ca4563a6eb479cb3de6"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-win_amd64.whl", hash = "sha256:e5b8daf27af0b90da7bb903a876477a9e6d7270be6146906b276605997c7e9a3"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:fc4b630cd3fa2cf7fce38afa91d7cfe844a9f75d7f0f36393fa98815e911d987"}, @@ -836,6 +848,7 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2f1c3765db32be59d18ab3953f43ab62a761327aafc1594a2a1fbe038b8b8a7"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d85252669dc32f98ebcd5d36768f5d4faeaeaa2d655ac0473be490ecdae3c285"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e143ada795c341b56de9418c58d028989093ee611aa27ffb9b7f609c00d813ed"}, + {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2c59aa6170b990d8d2719323e628aaf36f3bfbc1c26279c0eeeb24d05d2d11c7"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-win32.whl", hash = "sha256:beffaed67936fbbeffd10966a4eb53c402fafd3d6833770516bf7314bc6ffa12"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-win_amd64.whl", hash = "sha256:040ae85536960525ea62868b642bdb0c2cc6021c9f9d507810c0c604e66f5a7b"}, {file = "ruamel.yaml.clib-0.2.12.tar.gz", hash = "sha256:6c8fbb13ec503f99a91901ab46e0b07ae7941cd527393187039aec586fdfd36f"}, @@ -895,13 +908,13 @@ files = [ [[package]] name = "six" -version = "1.16.0" +version = "1.17.0" description = "Python 2 and 3 compatibility utilities" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, + {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, + {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, ] [[package]] @@ -917,13 +930,13 @@ files = [ [[package]] name = "syrupy" -version = "4.7.2" +version = "4.8.0" description = "Pytest Snapshot Test Utility" optional = false python-versions = ">=3.8.1" files = [ - {file = "syrupy-4.7.2-py3-none-any.whl", hash = "sha256:eae7ba6be5aed190237caa93be288e97ca1eec5ca58760e4818972a10c4acc64"}, - {file = "syrupy-4.7.2.tar.gz", hash = "sha256:ea45e099f242de1bb53018c238f408a5bb6c82007bc687aefcbeaa0e1c2e935a"}, + {file = "syrupy-4.8.0-py3-none-any.whl", hash = "sha256:544f4ec6306f4b1c460fdab48fd60b2c7fe54a6c0a8243aeea15f9ad9c638c3f"}, + {file = "syrupy-4.8.0.tar.gz", hash = "sha256:648f0e9303aaa8387c8365d7314784c09a6bab0a407455c6a01d6a4f5c6a8ede"}, ] [package.dependencies] @@ -931,30 +944,60 @@ pytest = ">=7.0.0,<9.0.0" [[package]] name = "taskipy" -version = "1.14.0" +version = "1.14.1" description = "tasks runner for python projects" optional = false python-versions = "<4.0,>=3.6" files = [ - {file = "taskipy-1.14.0-py3-none-any.whl", hash = "sha256:29040d9a8038170602feb71792bdef5203720ed30f595304aee843625892452b"}, - {file = "taskipy-1.14.0.tar.gz", hash = "sha256:5d9631c29980481d59858f0a100ed3200cf7468ca8c0540ef19388586485532d"}, + {file = "taskipy-1.14.1-py3-none-any.whl", hash = "sha256:6e361520f29a0fd2159848e953599f9c75b1d0b047461e4965069caeb94908f1"}, + {file = "taskipy-1.14.1.tar.gz", hash = "sha256:410fbcf89692dfd4b9f39c2b49e1750b0a7b81affd0e2d7ea8c35f9d6a4774ed"}, ] [package.dependencies] colorama = ">=0.4.4,<0.5.0" mslex = {version = ">=1.1.0,<2.0.0", markers = "sys_platform == \"win32\""} -psutil = ">=5.7.2,<6.0.0" +psutil = ">=5.7.2,<7" tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version >= \"3.7\" and python_version < \"4.0\""} [[package]] name = "tomli" -version = "2.1.0" +version = "2.2.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" files = [ - {file = "tomli-2.1.0-py3-none-any.whl", hash = "sha256:a5c57c3d1c56f5ccdf89f6523458f60ef716e210fc47c4cfb188c5ba473e0391"}, - {file = "tomli-2.1.0.tar.gz", hash = "sha256:3f646cae2aec94e17d04973e4249548320197cfabdf130015d023de4b74d8ab8"}, + {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, + {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, + {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"}, + {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"}, + {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"}, + {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"}, + {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"}, + {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"}, + {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"}, + {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"}, + {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"}, + {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"}, + {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"}, + {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"}, + {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"}, + {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"}, + {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"}, + {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"}, + {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"}, + {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"}, + {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"}, + {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"}, + {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"}, + {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"}, + {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"}, + {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"}, + {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"}, + {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"}, + {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"}, + {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"}, + {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, + {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, ] [[package]] @@ -987,24 +1030,24 @@ files = [ [[package]] name = "types-python-dateutil" -version = "2.9.0.20241003" +version = "2.9.0.20241206" description = "Typing stubs for python-dateutil" optional = false python-versions = ">=3.8" files = [ - {file = "types-python-dateutil-2.9.0.20241003.tar.gz", hash = "sha256:58cb85449b2a56d6684e41aeefb4c4280631246a0da1a719bdbe6f3fb0317446"}, - {file = "types_python_dateutil-2.9.0.20241003-py3-none-any.whl", hash = "sha256:250e1d8e80e7bbc3a6c99b907762711d1a1cdd00e978ad39cb5940f6f0a87f3d"}, + {file = "types_python_dateutil-2.9.0.20241206-py3-none-any.whl", hash = "sha256:e248a4bc70a486d3e3ec84d0dc30eec3a5f979d6e7ee4123ae043eedbb987f53"}, + {file = "types_python_dateutil-2.9.0.20241206.tar.gz", hash = "sha256:18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb"}, ] [[package]] name = "types-pyyaml" -version = "6.0.12.20240917" +version = "6.0.12.20241230" description = "Typing stubs for PyYAML" optional = false python-versions = ">=3.8" files = [ - {file = "types-PyYAML-6.0.12.20240917.tar.gz", hash = "sha256:d1405a86f9576682234ef83bcb4e6fff7c9305c8b1fbad5e0bcd4f7dbdc9c587"}, - {file = "types_PyYAML-6.0.12.20240917-py3-none-any.whl", hash = "sha256:392b267f1c0fe6022952462bf5d6523f31e37f6cea49b14cee7ad634b6301570"}, + {file = "types_PyYAML-6.0.12.20241230-py3-none-any.whl", hash = "sha256:fa4d32565219b68e6dee5f67534c722e53c00d1cfc09c435ef04d7353e1e96e6"}, + {file = "types_pyyaml-6.0.12.20241230.tar.gz", hash = "sha256:7f07622dbd34bb9c8b264fe860a17e0efcad00d50b5f27e93984909d9363498c"}, ] [[package]] @@ -1021,4 +1064,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "f42e193889dbd206ea15172bf960f11fe2d0333101f9a6ed9c0310d0749ebe0e" +content-hash = "d5daadf9bb61a900a0aaddfd615b2522dc3142940fa01d8d3c6071f40ba86998" diff --git a/pyproject.toml b/pyproject.toml index e94690fb2..1f39f8394 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ typer = ">0.6,<0.13" colorama = {version = ">=0.4.3", markers = "sys_platform == 'win32'"} shellingham = ">=1.3.2,<2.0.0" pydantic = ">=2.1.1,<3.0.0" -attrs = ">=21.3.0" +attrs = ">=22.2.0" python-dateutil = ">=2.8.1,<3.0.0" httpx = ">=0.20.0,<0.28.0" "ruamel.yaml" = ">=0.18.6,<0.19.0" diff --git a/tests/test_parser/test_openapi.py b/tests/test_parser/test_openapi.py index 1dbfdbab6..3c810e344 100644 --- a/tests/test_parser/test_openapi.py +++ b/tests/test_parser/test_openapi.py @@ -22,7 +22,7 @@ def make_endpoint(self): description=None, name="name", requires_security=False, - tag="tag", + tags=["tag"], relative_imports={"import_3"}, ) @@ -445,7 +445,7 @@ def test_from_data_bad_params(self, mocker, config): data=data, path=path, method=method, - tag="default", + tags=["default"], schemas=initial_schemas, responses={}, parameters=parameters, @@ -481,7 +481,7 @@ def test_from_data_bad_responses(self, mocker, config): data=data, path=path, method=method, - tag="default", + tags=["default"], schemas=initial_schemas, responses={}, parameters=initial_parameters, @@ -522,7 +522,7 @@ def test_from_data_standard(self, mocker, config): data=data, path=path, method=method, - tag="default", + tags=["default"], schemas=initial_schemas, responses={}, parameters=initial_parameters, @@ -538,7 +538,7 @@ def test_from_data_standard(self, mocker, config): summary="", name=data.operationId, requires_security=True, - tag="default", + tags=["default"], ), data=data, schemas=initial_schemas, @@ -574,7 +574,7 @@ def test_from_data_no_operation_id(self, mocker, config): data=data, path=path, method=method, - tag="default", + tags=["default"], schemas=schemas, responses={}, parameters=parameters, @@ -590,7 +590,7 @@ def test_from_data_no_operation_id(self, mocker, config): summary="", name="get_path_with_param", requires_security=True, - tag="default", + tags=["default"], ), data=data, schemas=schemas, @@ -630,7 +630,7 @@ def test_from_data_no_security(self, mocker, config): data=data, path=path, method=method, - tag="a", + tags=["a"], schemas=schemas, responses={}, parameters=parameters, @@ -646,7 +646,7 @@ def test_from_data_no_security(self, mocker, config): summary="", name=data.operationId, requires_security=False, - tag="a", + tags=["a"], ), data=data, parameters=parameters, @@ -676,7 +676,7 @@ def test_from_data_some_bad_bodies(self, config): responses={}, config=config, parameters=Parameters(), - tag="tag", + tags=["tag"], path="/", method="get", request_bodies={}, @@ -700,7 +700,7 @@ def test_from_data_all_bodies_bad(self, config): responses={}, config=config, parameters=Parameters(), - tag="tag", + tags=["tag"], path="/", method="get", request_bodies={}, @@ -773,94 +773,3 @@ def test_from_data_overrides_path_item_params_with_operation_params(self, config ) collection: EndpointCollection = collections["default"] assert isinstance(collection.endpoints[0].query_parameters[0], IntProperty) - - def test_from_data_errors(self, mocker, config): - from openapi_python_client.parser.openapi import ParseError - - path_1_put = oai.Operation.model_construct() - path_1_post = oai.Operation.model_construct(tags=["tag_2", "tag_3"]) - path_2_get = oai.Operation.model_construct() - data = { - "path_1": oai.PathItem.model_construct(post=path_1_post, put=path_1_put), - "path_2": oai.PathItem.model_construct(get=path_2_get), - } - schemas_1 = mocker.MagicMock() - schemas_2 = mocker.MagicMock() - schemas_3 = mocker.MagicMock() - parameters_1 = mocker.MagicMock() - parameters_2 = mocker.MagicMock() - parameters_3 = mocker.MagicMock() - mocker.patch.object( - Endpoint, - "from_data", - side_effect=[ - (ParseError(data="1"), schemas_1, parameters_1), - (ParseError(data="2"), schemas_2, parameters_2), - (mocker.MagicMock(errors=[ParseError(data="3")], path="path_2"), schemas_3, parameters_3), - ], - ) - schemas = mocker.MagicMock() - parameters = mocker.MagicMock() - - result, result_schemas, result_parameters = EndpointCollection.from_data( - data=data, - schemas=schemas, - config=config, - parameters=parameters, - request_bodies={}, - responses={}, - ) - - assert result["default"].parse_errors[0].data == "1" - assert result["default"].parse_errors[1].data == "3" - assert result["tag_2"].parse_errors[0].data == "2" - assert result_schemas == schemas_3 - - def test_from_data_tags_snake_case_sanitizer(self, mocker, config): - from openapi_python_client.parser.openapi import Endpoint, EndpointCollection - - path_1_put = oai.Operation.model_construct() - path_1_post = oai.Operation.model_construct(tags=["AMF Subscription Info (Document)", "tag_3"]) - path_2_get = oai.Operation.model_construct(tags=["3. ABC"]) - data = { - "path_1": oai.PathItem.model_construct(post=path_1_post, put=path_1_put), - "path_2": oai.PathItem.model_construct(get=path_2_get), - } - endpoint_1 = mocker.MagicMock(autospec=Endpoint, tag="default", relative_imports={"1", "2"}, path="path_1") - endpoint_2 = mocker.MagicMock( - autospec=Endpoint, tag="AMFSubscriptionInfo (Document)", relative_imports={"2"}, path="path_1" - ) - endpoint_3 = mocker.MagicMock(autospec=Endpoint, tag="default", relative_imports={"2", "3"}, path="path_2") - schemas_1 = mocker.MagicMock() - schemas_2 = mocker.MagicMock() - schemas_3 = mocker.MagicMock() - parameters_1 = mocker.MagicMock() - parameters_2 = mocker.MagicMock() - parameters_3 = mocker.MagicMock() - mocker.patch.object( - Endpoint, - "from_data", - side_effect=[ - (endpoint_1, schemas_1, parameters_1), - (endpoint_2, schemas_2, parameters_2), - (endpoint_3, schemas_3, parameters_3), - ], - ) - schemas = mocker.MagicMock() - parameters = mocker.MagicMock() - - result = EndpointCollection.from_data( - data=data, schemas=schemas, parameters=parameters, config=config, request_bodies={}, responses={} - ) - - assert result == ( - { - "default": EndpointCollection("default", endpoints=[endpoint_1]), - "amf_subscription_info_document": EndpointCollection( - "amf_subscription_info_document", endpoints=[endpoint_2] - ), - "tag3_abc": EndpointCollection("tag3_abc", endpoints=[endpoint_3]), - }, - schemas_3, - parameters_3, - ) diff --git a/tests/test_parser/test_properties/test_model_property.py b/tests/test_parser/test_properties/test_model_property.py index 8adc88e39..a51fd984b 100644 --- a/tests/test_parser/test_properties/test_model_property.py +++ b/tests/test_parser/test_properties/test_model_property.py @@ -19,12 +19,12 @@ class TestModelProperty: (False, True, False, False, "MyClass"), (True, False, False, False, "MyClass"), (True, True, False, False, "MyClass"), - (False, True, True, False, "Dict[str, Any]"), + (False, True, True, False, "dict[str, Any]"), (False, False, False, True, "Union[Unset, 'MyClass']"), (False, True, False, True, "'MyClass'"), (True, False, False, True, "'MyClass'"), (True, True, False, True, "'MyClass'"), - (False, True, True, True, "Dict[str, Any]"), + (False, True, True, True, "dict[str, Any]"), ], ) def test_get_type_string(self, no_optional, required, json, expected, model_property_factory, quoted): @@ -40,7 +40,6 @@ def test_get_imports(self, model_property_factory): assert prop.get_imports(prefix="..") == { "from typing import Union", "from ..types import UNSET, Unset", - "from typing import Dict", "from typing import cast", } @@ -719,8 +718,8 @@ def test_set_relative_imports(model_property_factory): from openapi_python_client.parser.properties import Class class_info = Class("ClassName", module_name="module_name") - relative_imports = {"from typing import List", f"from ..models.{class_info.module_name} import {class_info.name}"} + relative_imports = {f"from ..models.{class_info.module_name} import {class_info.name}"} model_property = model_property_factory(class_info=class_info, relative_imports=relative_imports) - assert model_property.relative_imports == {"from typing import List"} + assert model_property.relative_imports == set() diff --git a/tests/test_utils.py b/tests/test_utils.py index e7dccf9a8..fafa61805 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -99,7 +99,7 @@ def test_no_string_escapes(): ("int", "int_"), ("dict", "dict_"), ("not_reserved", "not_reserved"), - ("type", "type"), + ("type", "type_"), ("id", "id"), ("None", "None_"), ],