From dbe0738cc67b06b8e973f703e2911dfdb886cd7e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 16:20:39 +0000 Subject: [PATCH 1/2] chore(deps): update dependency ruff to >=0.2,<0.4 --- pdm.lock | 38 +++++++++++++++++++------------------- pyproject.toml | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/pdm.lock b/pdm.lock index 16dd3ae37..34659874e 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "dev"] strategy = ["cross_platform", "inherit_metadata"] lock_version = "4.4.1" -content_hash = "sha256:a23a85e44177747fe2f5b78661df13d27190875b0239fdce1ad54ea72b241201" +content_hash = "sha256:84c6cf3b047f230aa92bc01276c772c95ca0d96428fe0d5e01b95839ffe3b66f" [[package]] name = "annotated-types" @@ -892,28 +892,28 @@ files = [ [[package]] name = "ruff" -version = "0.2.2" +version = "0.3.0" requires_python = ">=3.7" summary = "An extremely fast Python linter and code formatter, written in Rust." groups = ["default"] files = [ - {file = "ruff-0.2.2-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:0a9efb032855ffb3c21f6405751d5e147b0c6b631e3ca3f6b20f917572b97eb6"}, - {file = "ruff-0.2.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:d450b7fbff85913f866a5384d8912710936e2b96da74541c82c1b458472ddb39"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ecd46e3106850a5c26aee114e562c329f9a1fbe9e4821b008c4404f64ff9ce73"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e22676a5b875bd72acd3d11d5fa9075d3a5f53b877fe7b4793e4673499318ba"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1695700d1e25a99d28f7a1636d85bafcc5030bba9d0578c0781ba1790dbcf51c"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:b0c232af3d0bd8f521806223723456ffebf8e323bd1e4e82b0befb20ba18388e"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f63d96494eeec2fc70d909393bcd76c69f35334cdbd9e20d089fb3f0640216ca"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6a61ea0ff048e06de273b2e45bd72629f470f5da8f71daf09fe481278b175001"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e1439c8f407e4f356470e54cdecdca1bd5439a0673792dbe34a2b0a551a2fe3"}, - {file = "ruff-0.2.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:940de32dc8853eba0f67f7198b3e79bc6ba95c2edbfdfac2144c8235114d6726"}, - {file = "ruff-0.2.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:0c126da55c38dd917621552ab430213bdb3273bb10ddb67bc4b761989210eb6e"}, - {file = "ruff-0.2.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:3b65494f7e4bed2e74110dac1f0d17dc8e1f42faaa784e7c58a98e335ec83d7e"}, - {file = "ruff-0.2.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:1ec49be4fe6ddac0503833f3ed8930528e26d1e60ad35c2446da372d16651ce9"}, - {file = "ruff-0.2.2-py3-none-win32.whl", hash = "sha256:d920499b576f6c68295bc04e7b17b6544d9d05f196bb3aac4358792ef6f34325"}, - {file = "ruff-0.2.2-py3-none-win_amd64.whl", hash = "sha256:cc9a91ae137d687f43a44c900e5d95e9617cb37d4c989e462980ba27039d239d"}, - {file = "ruff-0.2.2-py3-none-win_arm64.whl", hash = "sha256:c9d15fc41e6054bfc7200478720570078f0b41c9ae4f010bcc16bd6f4d1aacdd"}, - {file = "ruff-0.2.2.tar.gz", hash = "sha256:e62ed7f36b3068a30ba39193a14274cd706bc486fad521276458022f7bccb31d"}, + {file = "ruff-0.3.0-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:7deb528029bacf845bdbb3dbb2927d8ef9b4356a5e731b10eef171e3f0a85944"}, + {file = "ruff-0.3.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:e1e0d4381ca88fb2b73ea0766008e703f33f460295de658f5467f6f229658c19"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f7dbba46e2827dfcb0f0cc55fba8e96ba7c8700e0a866eb8cef7d1d66c25dcb"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:23dbb808e2f1d68eeadd5f655485e235c102ac6f12ad31505804edced2a5ae77"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ef655c51f41d5fa879f98e40c90072b567c666a7114fa2d9fe004dffba00932"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:d0d3d7ef3d4f06433d592e5f7d813314a34601e6c5be8481cccb7fa760aa243e"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b08b356d06a792e49a12074b62222f9d4ea2a11dca9da9f68163b28c71bf1dd4"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9343690f95710f8cf251bee1013bf43030072b9f8d012fbed6ad702ef70d360a"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a1f3ed501a42f60f4dedb7805fa8d4534e78b4e196f536bac926f805f0743d49"}, + {file = "ruff-0.3.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:cc30a9053ff2f1ffb505a585797c23434d5f6c838bacfe206c0e6cf38c921a1e"}, + {file = "ruff-0.3.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:5da894a29ec018a8293d3d17c797e73b374773943e8369cfc50495573d396933"}, + {file = "ruff-0.3.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:755c22536d7f1889be25f2baf6fedd019d0c51d079e8417d4441159f3bcd30c2"}, + {file = "ruff-0.3.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:dd73fe7f4c28d317855da6a7bc4aa29a1500320818dd8f27df95f70a01b8171f"}, + {file = "ruff-0.3.0-py3-none-win32.whl", hash = "sha256:19eacceb4c9406f6c41af806418a26fdb23120dfe53583df76d1401c92b7c14b"}, + {file = "ruff-0.3.0-py3-none-win_amd64.whl", hash = "sha256:128265876c1d703e5f5e5a4543bd8be47c73a9ba223fd3989d4aa87dd06f312f"}, + {file = "ruff-0.3.0-py3-none-win_arm64.whl", hash = "sha256:e3a4a6d46aef0a84b74fcd201a4401ea9a6cd85614f6a9435f2d33dd8cefbf83"}, + {file = "ruff-0.3.0.tar.gz", hash = "sha256:0886184ba2618d815067cf43e005388967b67ab9c80df52b32ec1152ab49f53a"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index af87c0d2b..723fd7073 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ dependencies = [ "python-dateutil>=2.8.1,<3.0.0", "httpx>=0.20.0,<0.28.0", "PyYAML>=6.0,<7.0", - "ruff>=0.2,<0.3", + "ruff>=0.2,<0.4", "typing-extensions>=4.8.0,<5.0.0", ] name = "openapi-python-client" From 12a389a124292d6a5bf7552b314a52a53c3a7dc1 Mon Sep 17 00:00:00 2001 From: Dylan Anthony Date: Fri, 1 Mar 2024 17:14:57 -0700 Subject: [PATCH 2/2] chore: Apply latest Ruff style --- .../my_test_api_client/api/__init__.py | 2 +- .../my_test_api_client/api/bodies/__init__.py | 2 +- .../my_test_api_client/api/default/__init__.py | 2 +- .../my_test_api_client/api/defaults/__init__.py | 2 +- .../my_test_api_client/api/enums/__init__.py | 2 +- .../my_test_api_client/api/location/__init__.py | 2 +- .../my_test_api_client/api/naming/__init__.py | 2 +- .../my_test_api_client/api/parameter_references/__init__.py | 2 +- .../my_test_api_client/api/parameters/__init__.py | 2 +- .../my_test_api_client/api/responses/__init__.py | 2 +- .../my_test_api_client/api/tag1/__init__.py | 2 +- .../my_test_api_client/api/tests/__init__.py | 2 +- .../my_test_api_client/api/true_/__init__.py | 2 +- .../golden-record/my_test_api_client/__init__.py | 3 ++- .../golden-record/my_test_api_client/api/__init__.py | 2 +- end_to_end_tests/golden-record/my_test_api_client/errors.py | 2 +- .../golden-record/my_test_api_client/models/__init__.py | 2 +- ...ular_ref_in_items_object_additional_properties_a_item.py | 6 +++--- ...ular_ref_in_items_object_additional_properties_b_item.py | 6 +++--- ...ursive_ref_in_items_object_additional_properties_item.py | 6 +++--- end_to_end_tests/golden-record/my_test_api_client/types.py | 3 ++- .../test_3_1_features_client/__init__.py | 3 ++- .../test_3_1_features_client/api/__init__.py | 2 +- .../test_3_1_features_client/errors.py | 2 +- .../test_3_1_features_client/models/__init__.py | 2 +- .../test_3_1_features_client/types.py | 3 ++- integration-tests/integration_tests/__init__.py | 3 ++- integration-tests/integration_tests/api/__init__.py | 2 +- integration-tests/integration_tests/errors.py | 2 +- integration-tests/integration_tests/models/__init__.py | 2 +- integration-tests/integration_tests/types.py | 3 ++- openapi_python_client/__init__.py | 2 +- openapi_python_client/parser/__init__.py | 2 +- openapi_python_client/parser/openapi.py | 3 +-- openapi_python_client/parser/properties/const.py | 3 +-- openapi_python_client/parser/properties/string.py | 3 +-- 36 files changed, 48 insertions(+), 45 deletions(-) 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 5db30f44e..f03fd5cfa 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,4 +1,4 @@ -""" Contains methods for accessing the API """ +"""Contains methods for accessing the API""" from typing import Type diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/bodies/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/bodies/__init__.py index ffbb41025..92367f620 100644 --- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/bodies/__init__.py +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/bodies/__init__.py @@ -1,4 +1,4 @@ -""" Contains methods for accessing the API Endpoints """ +"""Contains methods for accessing the API Endpoints""" import types diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/default/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/default/__init__.py index 726a77104..ab2d97db8 100644 --- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/default/__init__.py +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/default/__init__.py @@ -1,4 +1,4 @@ -""" Contains methods for accessing the API Endpoints """ +"""Contains methods for accessing the API Endpoints""" import types diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/defaults/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/defaults/__init__.py index cd3d6e786..6aa5e01dd 100644 --- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/defaults/__init__.py +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/defaults/__init__.py @@ -1,4 +1,4 @@ -""" Contains methods for accessing the API Endpoints """ +"""Contains methods for accessing the API Endpoints""" import types diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/enums/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/enums/__init__.py index 54295fd26..35ef889ac 100644 --- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/enums/__init__.py +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/enums/__init__.py @@ -1,4 +1,4 @@ -""" Contains methods for accessing the API Endpoints """ +"""Contains methods for accessing the API Endpoints""" import types diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/location/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/location/__init__.py index b85aa074d..42b7f4b61 100644 --- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/location/__init__.py +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/location/__init__.py @@ -1,4 +1,4 @@ -""" Contains methods for accessing the API Endpoints """ +"""Contains methods for accessing the API Endpoints""" import types diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/naming/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/naming/__init__.py index af01857db..864802814 100644 --- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/naming/__init__.py +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/naming/__init__.py @@ -1,4 +1,4 @@ -""" Contains methods for accessing the API Endpoints """ +"""Contains methods for accessing the API Endpoints""" import types diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/parameter_references/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/parameter_references/__init__.py index f96e9b318..850f70af8 100644 --- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/parameter_references/__init__.py +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/parameter_references/__init__.py @@ -1,4 +1,4 @@ -""" Contains methods for accessing the API Endpoints """ +"""Contains methods for accessing the API Endpoints""" import types diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/parameters/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/parameters/__init__.py index 7bf263058..75eac4762 100644 --- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/parameters/__init__.py +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/parameters/__init__.py @@ -1,4 +1,4 @@ -""" Contains methods for accessing the API Endpoints """ +"""Contains methods for accessing the API Endpoints""" import types diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/responses/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/responses/__init__.py index 353c41b9b..6000bd0e7 100644 --- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/responses/__init__.py +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/responses/__init__.py @@ -1,4 +1,4 @@ -""" Contains methods for accessing the API Endpoints """ +"""Contains methods for accessing the API Endpoints""" import types diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tag1/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tag1/__init__.py index 556ca84e8..09438f2a4 100644 --- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tag1/__init__.py +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tag1/__init__.py @@ -1,4 +1,4 @@ -""" Contains methods for accessing the API Endpoints """ +"""Contains methods for accessing the API Endpoints""" import types diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tests/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tests/__init__.py index 9af9c4626..1b91acc98 100644 --- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tests/__init__.py +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/tests/__init__.py @@ -1,4 +1,4 @@ -""" Contains methods for accessing the API Endpoints """ +"""Contains methods for accessing the API Endpoints""" import types diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/true_/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/true_/__init__.py index 9c2a0566f..d86874428 100644 --- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/true_/__init__.py +++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/true_/__init__.py @@ -1,4 +1,4 @@ -""" Contains methods for accessing the API Endpoints """ +"""Contains methods for accessing the API Endpoints""" import types diff --git a/end_to_end_tests/golden-record/my_test_api_client/__init__.py b/end_to_end_tests/golden-record/my_test_api_client/__init__.py index 530928e7a..3747245da 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/__init__.py +++ b/end_to_end_tests/golden-record/my_test_api_client/__init__.py @@ -1,4 +1,5 @@ -""" A client library for accessing My Test API """ +"""A client library for accessing My Test API""" + from .client import AuthenticatedClient, Client __all__ = ( diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/__init__.py b/end_to_end_tests/golden-record/my_test_api_client/api/__init__.py index dc035f4ce..81f9fa241 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/api/__init__.py +++ b/end_to_end_tests/golden-record/my_test_api_client/api/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the API """ +"""Contains methods for accessing the API""" diff --git a/end_to_end_tests/golden-record/my_test_api_client/errors.py b/end_to_end_tests/golden-record/my_test_api_client/errors.py index 426f8a2ed..be532ad00 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/errors.py +++ b/end_to_end_tests/golden-record/my_test_api_client/errors.py @@ -1,4 +1,4 @@ -""" Contains shared errors types that can be raised from API functions """ +"""Contains shared errors types that can be raised from API functions""" class UnexpectedStatus(Exception): diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/__init__.py b/end_to_end_tests/golden-record/my_test_api_client/models/__init__.py index cf12278fc..7435983e3 100644 --- a/end_to_end_tests/golden-record/my_test_api_client/models/__init__.py +++ b/end_to_end_tests/golden-record/my_test_api_client/models/__init__.py @@ -1,4 +1,4 @@ -""" Contains all the data models used in inputs/outputs """ +"""Contains all the data models used in inputs/outputs""" from .a_discriminated_union_type_1 import ADiscriminatedUnionType1 from .a_discriminated_union_type_2 import ADiscriminatedUnionType2 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 eec98255f..c505553b6 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 @@ -16,9 +16,9 @@ class AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem: """ """ - additional_properties: Dict[ - str, List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem"] - ] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem"]] = ( + _attrs_field(init=False, factory=dict) + ) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[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_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 479b177ea..9d2dc9827 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 @@ -16,9 +16,9 @@ class AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem: """ """ - additional_properties: Dict[ - str, List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem"] - ] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem"]] = ( + _attrs_field(init=False, factory=dict) + ) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[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 301a66e0e..e19cfc052 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 @@ -10,9 +10,9 @@ class AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem: """ """ - additional_properties: Dict[ - str, List["AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem"] - ] = _attrs_field(init=False, factory=dict) + additional_properties: Dict[str, List["AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem"]] = ( + _attrs_field(init=False, factory=dict) + ) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} 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 dbdcc5d43..21fac106f 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,4 +1,5 @@ -""" Contains some shared types for properties """ +"""Contains some shared types for properties""" + from http import HTTPStatus from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar diff --git a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/__init__.py b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/__init__.py index e1b05febe..1795e0abf 100644 --- a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/__init__.py +++ b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/__init__.py @@ -1,4 +1,5 @@ -""" A client library for accessing Test 3.1 Features """ +"""A client library for accessing Test 3.1 Features""" + from .client import AuthenticatedClient, Client __all__ = ( diff --git a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/api/__init__.py b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/api/__init__.py index dc035f4ce..81f9fa241 100644 --- a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/api/__init__.py +++ b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/api/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the API """ +"""Contains methods for accessing the API""" diff --git a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/errors.py b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/errors.py index 426f8a2ed..be532ad00 100644 --- a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/errors.py +++ b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/errors.py @@ -1,4 +1,4 @@ -""" Contains shared errors types that can be raised from API functions """ +"""Contains shared errors types that can be raised from API functions""" class UnexpectedStatus(Exception): diff --git a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/models/__init__.py b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/models/__init__.py index df63ea1cd..f923a5c37 100644 --- a/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/models/__init__.py +++ b/end_to_end_tests/test-3-1-golden-record/test_3_1_features_client/models/__init__.py @@ -1,4 +1,4 @@ -""" Contains all the data models used in inputs/outputs """ +"""Contains all the data models used in inputs/outputs""" from .post_const_path_body import PostConstPathBody 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 dbdcc5d43..21fac106f 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,4 +1,5 @@ -""" Contains some shared types for properties """ +"""Contains some shared types for properties""" + from http import HTTPStatus from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar diff --git a/integration-tests/integration_tests/__init__.py b/integration-tests/integration_tests/__init__.py index 48f0fb8da..8c557afd6 100644 --- a/integration-tests/integration_tests/__init__.py +++ b/integration-tests/integration_tests/__init__.py @@ -1,4 +1,5 @@ -""" A client library for accessing OpenAPI Test Server """ +"""A client library for accessing OpenAPI Test Server""" + from .client import AuthenticatedClient, Client __all__ = ( diff --git a/integration-tests/integration_tests/api/__init__.py b/integration-tests/integration_tests/api/__init__.py index dc035f4ce..81f9fa241 100644 --- a/integration-tests/integration_tests/api/__init__.py +++ b/integration-tests/integration_tests/api/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the API """ +"""Contains methods for accessing the API""" diff --git a/integration-tests/integration_tests/errors.py b/integration-tests/integration_tests/errors.py index 426f8a2ed..be532ad00 100644 --- a/integration-tests/integration_tests/errors.py +++ b/integration-tests/integration_tests/errors.py @@ -1,4 +1,4 @@ -""" Contains shared errors types that can be raised from API functions """ +"""Contains shared errors types that can be raised from API functions""" class UnexpectedStatus(Exception): diff --git a/integration-tests/integration_tests/models/__init__.py b/integration-tests/integration_tests/models/__init__.py index 0bc731d78..275cf6faa 100644 --- a/integration-tests/integration_tests/models/__init__.py +++ b/integration-tests/integration_tests/models/__init__.py @@ -1,4 +1,4 @@ -""" Contains all the data models used in inputs/outputs """ +"""Contains all the data models used in inputs/outputs""" from .post_body_multipart_body import PostBodyMultipartBody from .post_body_multipart_response_200 import PostBodyMultipartResponse200 diff --git a/integration-tests/integration_tests/types.py b/integration-tests/integration_tests/types.py index dbdcc5d43..21fac106f 100644 --- a/integration-tests/integration_tests/types.py +++ b/integration-tests/integration_tests/types.py @@ -1,4 +1,5 @@ -""" Contains some shared types for properties """ +"""Contains some shared types for properties""" + from http import HTTPStatus from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar diff --git a/openapi_python_client/__init__.py b/openapi_python_client/__init__.py index 39bc18c2f..23d972eac 100644 --- a/openapi_python_client/__init__.py +++ b/openapi_python_client/__init__.py @@ -1,4 +1,4 @@ -""" Generate modern Python clients from OpenAPI """ +"""Generate modern Python clients from OpenAPI""" import json import mimetypes diff --git a/openapi_python_client/parser/__init__.py b/openapi_python_client/parser/__init__.py index 6c20f52d1..9cdeb36fd 100644 --- a/openapi_python_client/parser/__init__.py +++ b/openapi_python_client/parser/__init__.py @@ -1,4 +1,4 @@ -""" Classes representing the data in the OpenAPI schema """ +"""Classes representing the data in the OpenAPI schema""" __all__ = ["GeneratorData", "import_string_from_class"] diff --git a/openapi_python_client/parser/openapi.py b/openapi_python_client/parser/openapi.py index 20a5e9376..c04cd1e8b 100644 --- a/openapi_python_client/parser/openapi.py +++ b/openapi_python_client/parser/openapi.py @@ -114,8 +114,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 diff --git a/openapi_python_client/parser/properties/const.py b/openapi_python_client/parser/properties/const.py index 249808a8a..88a398893 100644 --- a/openapi_python_client/parser/properties/const.py +++ b/openapi_python_client/parser/properties/const.py @@ -78,8 +78,7 @@ def _convert_value(value: None) -> None: # type: ignore[misc] @staticmethod @overload - def _convert_value(value: Any) -> Value: - ... # pragma: no cover + def _convert_value(value: Any) -> Value: ... # pragma: no cover @staticmethod def _convert_value(value: Any) -> Value | None: diff --git a/openapi_python_client/parser/properties/string.py b/openapi_python_client/parser/properties/string.py index 9a1603f01..1afe02c62 100644 --- a/openapi_python_client/parser/properties/string.py +++ b/openapi_python_client/parser/properties/string.py @@ -61,8 +61,7 @@ def convert_value(cls, value: None) -> None: # type: ignore[misc] @classmethod @overload - def convert_value(cls, value: Any) -> Value: - ... # pragma: no cover + def convert_value(cls, value: Any) -> Value: ... # pragma: no cover @classmethod def convert_value(cls, value: Any) -> Value | None: