Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/support_ruff_013.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: minor
---

# Support Ruff 0.13
41 changes: 21 additions & 20 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies = [
"python-dateutil>=2.8.1,<3.0.0",
"httpx>=0.23.0,<0.29.0",
"ruamel.yaml>=0.18.6,<0.19.0",
"ruff>=0.2,<0.13",
"ruff>=0.2,<0.14",
"typing-extensions>=4.8.0,<5.0.0",
]
name = "openapi-python-client"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_parser/test_openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def test_from_data_no_operation_id(self, mocker, config):
mocker.patch("openapi_python_client.utils.remove_string_escapes", return_value=data.description)
parameters = mocker.MagicMock()

endpoint, _, return_params = Endpoint.from_data(
Endpoint.from_data(
data=data,
path=path,
method=method,
Expand Down Expand Up @@ -651,7 +651,7 @@ def test_from_data_overrides_path_item_params_with_operation_params(self, config
)
}

collections, schemas, parameters = EndpointCollection.from_data(
collections, _schemas, _parameters = EndpointCollection.from_data(
data=data,
schemas=Schemas(),
parameters=Parameters(),
Expand Down
18 changes: 9 additions & 9 deletions tests/test_parser/test_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
def test_response_from_data_no_content(any_property_factory):
data = oai.Response.model_construct(description="")

response, schemas = response_from_data(
response, _schemas = response_from_data(
status_code=HTTPStatusPattern(pattern="200", code_range=(200, 200)),
data=data,
schemas=Schemas(),
Expand Down Expand Up @@ -49,7 +49,7 @@ def test_response_from_data_unsupported_content_type():
data = oai.Response.model_construct(description="", content={"blah": None})
config = MagicMock()
config.content_type_overrides = {}
response, schemas = response_from_data(
response, _schemas = response_from_data(
status_code=status_code,
data=data,
schemas=Schemas(),
Expand All @@ -68,7 +68,7 @@ def test_response_from_data_no_content_schema(any_property_factory):
)
config = MagicMock()
config.content_type_overrides = {}
response, schemas = response_from_data(
response, _schemas = response_from_data(
status_code=status_code,
data=data,
schemas=Schemas(),
Expand Down Expand Up @@ -99,7 +99,7 @@ def test_response_from_data_property_error(mocker):
config = MagicMock()
config.content_type_overrides = {}

response, schemas = responses.response_from_data(
response, _schemas = responses.response_from_data(
status_code=HTTPStatusPattern(pattern="400", code_range=(400, 400)),
data=data,
schemas=Schemas(),
Expand Down Expand Up @@ -130,7 +130,7 @@ def test_response_from_data_property(mocker, any_property_factory):
config.content_type_overrides = {}
status_code = HTTPStatusPattern(pattern="400", code_range=(400, 400))

response, schemas = responses.response_from_data(
response, _schemas = responses.response_from_data(
status_code=status_code,
data=data,
schemas=Schemas(),
Expand Down Expand Up @@ -165,7 +165,7 @@ def test_response_from_data_reference(mocker, any_property_factory):
config = MagicMock()
config.content_type_overrides = {}

response, schemas = responses.response_from_data(
response, _schemas = responses.response_from_data(
status_code=HTTPStatusPattern(pattern="400", code_range=(400, 400)),
data=oai.Reference.model_construct(ref="#/components/responses/ErrorResponse"),
schemas=Schemas(),
Expand Down Expand Up @@ -200,7 +200,7 @@ def test_response_from_data_invalid_reference(ref_string, expected_error_string,
config = MagicMock()
config.content_type_overrides = {}

response, schemas = responses.response_from_data(
response, _schemas = responses.response_from_data(
status_code=HTTPStatusPattern(pattern="400", code_range=(400, 400)),
data=oai.Reference.model_construct(ref=ref_string),
schemas=Schemas(),
Expand All @@ -226,7 +226,7 @@ def test_response_from_data_ref_to_response_that_is_a_ref(mocker, any_property_f
config = MagicMock()
config.content_type_overrides = {}

response, schemas = responses.response_from_data(
response, _schemas = responses.response_from_data(
status_code=HTTPStatusPattern(pattern="400", code_range=(400, 400)),
data=oai.Reference.model_construct(ref="#/components/responses/ErrorResponse"),
schemas=Schemas(),
Expand All @@ -249,7 +249,7 @@ def test_response_from_data_content_type_overrides(any_property_factory):
)
config = MagicMock()
config.content_type_overrides = {"application/zip": "application/octet-stream"}
response, schemas = response_from_data(
response, _schemas = response_from_data(
status_code=HTTPStatusPattern(pattern="200", code_range=(200, 200)),
data=data,
schemas=Schemas(),
Expand Down
Loading