openapi-python-client 0.25.0__py3-none-any.whl → 0.25.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ from typing import Optional, Union
6
6
 
7
7
  import typer
8
8
 
9
- from openapi_python_client import MetaType
9
+ from openapi_python_client import MetaType, __version__
10
10
  from openapi_python_client.config import Config, ConfigFile
11
11
  from openapi_python_client.parser.errors import ErrorLevel, GeneratorError, ParseError
12
12
 
@@ -14,8 +14,6 @@ app = typer.Typer(name="openapi-python-client")
14
14
 
15
15
 
16
16
  def _version_callback(value: bool) -> None:
17
- from openapi_python_client import __version__
18
-
19
17
  if value:
20
18
  typer.echo(f"openapi-python-client version: {__version__}")
21
19
  raise typer.Exit()
@@ -153,7 +151,7 @@ def generate(
153
151
  ),
154
152
  ) -> None:
155
153
  """Generate a new OpenAPI Client library"""
156
- from . import generate
154
+ from . import generate # noqa: PLC0415
157
155
 
158
156
  config = _process_config(
159
157
  url=url,
@@ -33,7 +33,7 @@ class AnyProperty(PropertyProtocol):
33
33
 
34
34
  @classmethod
35
35
  def convert_value(cls, value: Any) -> Value | None:
36
- from .string import StringProperty
36
+ from .string import StringProperty # noqa: PLC0415
37
37
 
38
38
  if value is None:
39
39
  return value
@@ -22,7 +22,7 @@ class FileProperty(PropertyProtocol):
22
22
 
23
23
  _type_string: ClassVar[str] = "File"
24
24
  # Return type of File.to_tuple()
25
- _json_type_string: ClassVar[str] = "types.FileTypes"
25
+ _json_type_string: ClassVar[str] = "FileTypes"
26
26
  template: ClassVar[str] = "file_property.py.jinja"
27
27
 
28
28
  @classmethod
@@ -56,7 +56,7 @@ class ListProperty(PropertyProtocol):
56
56
  `(result, schemas)` where `schemas` is an updated version of the input named the same including any inner
57
57
  classes that were defined and `result` is either the `ListProperty` or a `PropertyError`.
58
58
  """
59
- from . import property_from_data
59
+ from . import property_from_data # noqa: PLC0415
60
60
 
61
61
  if data.items is None and not data.prefixItems:
62
62
  return (
@@ -242,8 +242,8 @@ def _process_properties( # noqa: PLR0912, PLR0911
242
242
  config: Config,
243
243
  roots: set[ReferencePath | utils.ClassName],
244
244
  ) -> _PropertyData | PropertyError:
245
- from . import property_from_data
246
- from .merge_properties import merge_properties
245
+ from . import property_from_data # noqa: PLC0415
246
+ from .merge_properties import merge_properties # noqa: PLC0415
247
247
 
248
248
  properties: dict[str, Property] = {}
249
249
  relative_imports: set[str] = set()
@@ -353,7 +353,7 @@ def _get_additional_properties(
353
353
  config: Config,
354
354
  roots: set[ReferencePath | utils.ClassName],
355
355
  ) -> tuple[Property | None | PropertyError, Schemas]:
356
- from . import property_from_data
356
+ from . import property_from_data # noqa: PLC0415
357
357
 
358
358
  if schema_additional is None:
359
359
  return ANY_ADDITIONAL_PROPERTY, schemas
@@ -174,7 +174,7 @@ class PropertyProtocol(Protocol):
174
174
  @property
175
175
  def is_base_type(self) -> bool:
176
176
  """Base types, represented by any other of `Property` than `ModelProperty` should not be quoted."""
177
- from . import ListProperty, ModelProperty, UnionProperty
177
+ from . import ListProperty, ModelProperty, UnionProperty # noqa: PLC0415
178
178
 
179
179
  return self.__class__.__name__ not in {
180
180
  ModelProperty.__name__,
@@ -118,7 +118,7 @@ def update_schemas_with_data(
118
118
  See Also:
119
119
  - https://swagger.io/docs/specification/using-ref/
120
120
  """
121
- from . import property_from_data
121
+ from . import property_from_data # noqa: PLC0415
122
122
 
123
123
  prop: Union[PropertyError, Property]
124
124
  prop, schemas = property_from_data(
@@ -45,7 +45,7 @@ class UnionProperty(PropertyProtocol):
45
45
  `(result, schemas)` where `schemas` is the updated version of the input `schemas` and `result` is the
46
46
  constructed `UnionProperty` or a `PropertyError` describing what went wrong.
47
47
  """
48
- from . import property_from_data
48
+ from . import property_from_data # noqa: PLC0415
49
49
 
50
50
  sub_properties: list[PropertyProtocol] = []
51
51
 
@@ -180,7 +180,7 @@ class UnionProperty(PropertyProtocol):
180
180
 
181
181
  def validate_location(self, location: oai.ParameterLocation) -> ParseError | None:
182
182
  """Returns an error if this type of property is not allowed in the given location"""
183
- from ..properties import Property
183
+ from ..properties import Property # noqa: PLC0415
184
184
 
185
185
  for inner_prop in self.inner_properties:
186
186
  if evolve(cast(Property, inner_prop), required=self.required).validate_location(location) is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openapi-python-client
3
- Version: 0.25.0
3
+ Version: 0.25.2
4
4
  Summary: Generate modern Python clients from OpenAPI
5
5
  Project-URL: repository, https://github.com/openapi-generators/openapi-python-client
6
6
  Author-email: Dylan Anthony <contact@dylananthony.com>
@@ -26,7 +26,7 @@ Requires-Dist: jinja2<4.0.0,>=3.0.0
26
26
  Requires-Dist: pydantic<3.0.0,>=2.10
27
27
  Requires-Dist: python-dateutil<3.0.0,>=2.8.1
28
28
  Requires-Dist: ruamel-yaml<0.19.0,>=0.18.6
29
- Requires-Dist: ruff<0.12,>=0.2
29
+ Requires-Dist: ruff<0.13,>=0.2
30
30
  Requires-Dist: shellingham<2.0.0,>=1.3.2
31
31
  Requires-Dist: typer<0.17,>0.6
32
32
  Requires-Dist: typing-extensions<5.0.0,>=4.8.0
@@ -1,6 +1,6 @@
1
1
  openapi_python_client/__init__.py,sha256=UmafE7lgYeYtURttGklOQyFsa-wy1RqMraRllHbZKEo,14063
2
2
  openapi_python_client/__main__.py,sha256=wcCrL4PjG51r5wVKqJhcoJPTLfHW0wNbD31DrUN0MWI,28
3
- openapi_python_client/cli.py,sha256=5JHNaka2JNK6GLxxTsdROaYfNTnEuRWatf4cgedC0YY,5553
3
+ openapi_python_client/cli.py,sha256=o-eL8uj6XfyHRH4ePCRk33N-b-PzYGOPaheDRLjlr_4,5532
4
4
  openapi_python_client/config.py,sha256=S8XnwmafMLeJ_sspwiVNmIxF7glnc-FfbvGARPnG0fQ,4210
5
5
  openapi_python_client/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
6
6
  openapi_python_client/utils.py,sha256=axPyIeoEq3I8QSGtFPgZR3sDOpmGsguDZO3y0pnjp8M,3936
@@ -10,25 +10,25 @@ openapi_python_client/parser/errors.py,sha256=HzX7fLhGJEgTY12N9ICjS3KDBnfn-AlCTB
10
10
  openapi_python_client/parser/openapi.py,sha256=CIq1YfEF9kZdKDIzYV967rk1nKNgzf9sQfO_uwvdO0Y,23301
11
11
  openapi_python_client/parser/responses.py,sha256=AqKP2dEE9CyvY7I0OMEPfHXQm0DeiZgS43MBnGPfgLI,5028
12
12
  openapi_python_client/parser/properties/__init__.py,sha256=DL6miAjN2XhEvi7DkAaZrTD4p7ej_waD8AaIySjhRBM,16376
13
- openapi_python_client/parser/properties/any.py,sha256=ZkBan9M4uvgRy0JHnzBFLGzLzIDsnjyaHPVVrS2Nvck,1322
13
+ openapi_python_client/parser/properties/any.py,sha256=pj8KdhwS1M0cxNC_Y1MKdCPtp0YT3WVMAyZX-4bnyVc,1339
14
14
  openapi_python_client/parser/properties/boolean.py,sha256=xdkZyiUvdhKmEmGmaT88biPGoocsgbjxbqzv_2mlkv8,2042
15
15
  openapi_python_client/parser/properties/const.py,sha256=dEw07zPA6xcizt6N0ElXm4_taZ4AEAt8OJ3BXTdCkyQ,3771
16
16
  openapi_python_client/parser/properties/date.py,sha256=1OzUNLJef3V6uWswM_Z_H3TjULDaN9xGWFNSk2ZCnLk,2354
17
17
  openapi_python_client/parser/properties/datetime.py,sha256=J9BWgoZE1jK0Td625SrBUdThch6vgKAR-Iox2aUQBcE,2382
18
18
  openapi_python_client/parser/properties/enum_property.py,sha256=60LuqJRELlpUVJ4A3kRJlncoVVCIVae-A-lnbn91xnQ,8818
19
- openapi_python_client/parser/properties/file.py,sha256=1lw6pzo92sgNL_7_ezLVd1DYoGMGGqurgKhHNDhfikk,2000
19
+ openapi_python_client/parser/properties/file.py,sha256=8FucE3jpkXti6QyfxyoZXKmQtaiJM7FewfCPiB39s1s,1994
20
20
  openapi_python_client/parser/properties/float.py,sha256=Ent7smCPFPBZAmxVykD2NgHXv6uCZxabAsenYB_AuSA,2201
21
21
  openapi_python_client/parser/properties/int.py,sha256=O455r8xjI4e6KHjhoblHHNHZYi6tWu-c2KBTCguKmbM,2200
22
- openapi_python_client/parser/properties/list_property.py,sha256=kH1fleXWLhgXky_EO13vhwMZgTWxLWbTol1tTUQmv7c,5755
22
+ openapi_python_client/parser/properties/list_property.py,sha256=3B-8ktYvNkqrPt4oZMcmL6LYDthaeT-1i2wR32JlsPE,5772
23
23
  openapi_python_client/parser/properties/literal_enum_property.py,sha256=eVF9oMUUeXGNcqJOQ7H3s3ol7tXTTYdt_xG44B_fWwY,7514
24
24
  openapi_python_client/parser/properties/merge_properties.py,sha256=2xu9dMs7Zohg84iu-MND1X3jX-M2QzMfjABPDcWOsO0,9655
25
- openapi_python_client/parser/properties/model_property.py,sha256=6vrkmZkhsIJ5XTtdd1WKB-o-S0HhSr6_yRqPPo9nfWs,16882
25
+ openapi_python_client/parser/properties/model_property.py,sha256=3cdl34V07mJlVKdKYyo8y8xGG8vX1C1Qtne02c1k0Pg,16933
26
26
  openapi_python_client/parser/properties/none.py,sha256=BPx6lDyEicMyiWnxcVIuKPZrm0zsoGGUDbrEXJdDizA,1754
27
27
  openapi_python_client/parser/properties/property.py,sha256=O4j0s0Wxawrd7pPxJScCZqSqs9iOOxXBBojhD63e-8c,998
28
- openapi_python_client/parser/properties/protocol.py,sha256=nCUNPnX6R4mWiLXd1VdCiGysu4X7inFSuUUg3o4SBfc,7167
29
- openapi_python_client/parser/properties/schemas.py,sha256=EZXwb4_xt8DEhV7wTi-Pd8W8cJHyBPQBDraXyfmgK1k,8605
28
+ openapi_python_client/parser/properties/protocol.py,sha256=Gpx42SHYqA6OJBCiwru2HrheoSIpVQBGp7bSGPitl8c,7184
29
+ openapi_python_client/parser/properties/schemas.py,sha256=ndfs51dX3A_ucwOPQ5dqqKTYJFpQf5VAZO-8O-WlOmI,8622
30
30
  openapi_python_client/parser/properties/string.py,sha256=G4Apny6OXkjVQd-SUjBUe5i2pBL7VaVxE2aGDTXGmpM,1895
31
- openapi_python_client/parser/properties/union.py,sha256=U_qv5ek-UdRbnR1qNcjuheEkR8Ik8-oqGr09UPcapx4,7804
31
+ openapi_python_client/parser/properties/union.py,sha256=mrRAsuqjXW6tILUdqk9W3FIdVjk8z30Fsh1N6iN341o,7838
32
32
  openapi_python_client/parser/properties/uuid.py,sha256=kuVZDs0VytchgfmNYRr5trlhU3uyWWdChyta3C9LDTE,2452
33
33
  openapi_python_client/schema/3.0.3.md,sha256=0a25-q_HFDVcsxOnMOGeTo67K4FtLHqMfI5U8VwneJg,126244
34
34
  openapi_python_client/schema/3.1.0.md,sha256=O4SlQ2wux5Sa68Q9jrCcZYEJ5RcqXniJ9pSixtR15Rc,131397
@@ -103,8 +103,8 @@ openapi_python_client/templates/property_templates/model_property.py.jinja,sha25
103
103
  openapi_python_client/templates/property_templates/property_macros.py.jinja,sha256=s0DqGOc8rbEKptUtH1tAht08wahN3xXpaGfyzVa3Kog,580
104
104
  openapi_python_client/templates/property_templates/union_property.py.jinja,sha256=Xi-5XAbyRH65eYz6G1RNdchjKiYl99J4JyhvLqdR9h0,4088
105
105
  openapi_python_client/templates/property_templates/uuid_property.py.jinja,sha256=g1YZFkrC7PXX_r8Cbf5z_yJRzQoViow4yFWvBqUxj2o,1004
106
- openapi_python_client-0.25.0.dist-info/METADATA,sha256=vYPBky1K1EqGuNDLfjMVBmDJa5yTJEhUMDSqDBaJk2M,11732
107
- openapi_python_client-0.25.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
108
- openapi_python_client-0.25.0.dist-info/entry_points.txt,sha256=iRfSdN2foASZXr8GghkYa6KRXkDgO0EFfLut5IXoBTU,72
109
- openapi_python_client-0.25.0.dist-info/licenses/LICENSE,sha256=4dpxQYqY0DB3aTauRrqYRuu6BVNsPSJdYeUT3sH6pQY,1075
110
- openapi_python_client-0.25.0.dist-info/RECORD,,
106
+ openapi_python_client-0.25.2.dist-info/METADATA,sha256=mdwSBuc2dAkaAFH9GTnOlaKtLDSXRfT39osQsd9IcoM,11732
107
+ openapi_python_client-0.25.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
108
+ openapi_python_client-0.25.2.dist-info/entry_points.txt,sha256=iRfSdN2foASZXr8GghkYa6KRXkDgO0EFfLut5IXoBTU,72
109
+ openapi_python_client-0.25.2.dist-info/licenses/LICENSE,sha256=4dpxQYqY0DB3aTauRrqYRuu6BVNsPSJdYeUT3sH6pQY,1075
110
+ openapi_python_client-0.25.2.dist-info/RECORD,,