Skip to content

Commit f7464d1

Browse files
committed
chore: Adopt new Ruff lints
1 parent 8a8dd16 commit f7464d1

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

tests/test_parser/test_openapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def test_from_data_no_operation_id(self, mocker, config):
466466
mocker.patch("openapi_python_client.utils.remove_string_escapes", return_value=data.description)
467467
parameters = mocker.MagicMock()
468468

469-
endpoint, _, return_params = Endpoint.from_data(
469+
Endpoint.from_data(
470470
data=data,
471471
path=path,
472472
method=method,
@@ -651,7 +651,7 @@ def test_from_data_overrides_path_item_params_with_operation_params(self, config
651651
)
652652
}
653653

654-
collections, schemas, parameters = EndpointCollection.from_data(
654+
collections, _schemas, _parameters = EndpointCollection.from_data(
655655
data=data,
656656
schemas=Schemas(),
657657
parameters=Parameters(),

tests/test_parser/test_responses.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
def test_response_from_data_no_content(any_property_factory):
2121
data = oai.Response.model_construct(description="")
2222

23-
response, schemas = response_from_data(
23+
response, _schemas = response_from_data(
2424
status_code=HTTPStatusPattern(pattern="200", code_range=(200, 200)),
2525
data=data,
2626
schemas=Schemas(),
@@ -49,7 +49,7 @@ def test_response_from_data_unsupported_content_type():
4949
data = oai.Response.model_construct(description="", content={"blah": None})
5050
config = MagicMock()
5151
config.content_type_overrides = {}
52-
response, schemas = response_from_data(
52+
response, _schemas = response_from_data(
5353
status_code=status_code,
5454
data=data,
5555
schemas=Schemas(),
@@ -68,7 +68,7 @@ def test_response_from_data_no_content_schema(any_property_factory):
6868
)
6969
config = MagicMock()
7070
config.content_type_overrides = {}
71-
response, schemas = response_from_data(
71+
response, _schemas = response_from_data(
7272
status_code=status_code,
7373
data=data,
7474
schemas=Schemas(),
@@ -99,7 +99,7 @@ def test_response_from_data_property_error(mocker):
9999
config = MagicMock()
100100
config.content_type_overrides = {}
101101

102-
response, schemas = responses.response_from_data(
102+
response, _schemas = responses.response_from_data(
103103
status_code=HTTPStatusPattern(pattern="400", code_range=(400, 400)),
104104
data=data,
105105
schemas=Schemas(),
@@ -130,7 +130,7 @@ def test_response_from_data_property(mocker, any_property_factory):
130130
config.content_type_overrides = {}
131131
status_code = HTTPStatusPattern(pattern="400", code_range=(400, 400))
132132

133-
response, schemas = responses.response_from_data(
133+
response, _schemas = responses.response_from_data(
134134
status_code=status_code,
135135
data=data,
136136
schemas=Schemas(),
@@ -165,7 +165,7 @@ def test_response_from_data_reference(mocker, any_property_factory):
165165
config = MagicMock()
166166
config.content_type_overrides = {}
167167

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

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

229-
response, schemas = responses.response_from_data(
229+
response, _schemas = responses.response_from_data(
230230
status_code=HTTPStatusPattern(pattern="400", code_range=(400, 400)),
231231
data=oai.Reference.model_construct(ref="#/components/responses/ErrorResponse"),
232232
schemas=Schemas(),
@@ -249,7 +249,7 @@ def test_response_from_data_content_type_overrides(any_property_factory):
249249
)
250250
config = MagicMock()
251251
config.content_type_overrides = {"application/zip": "application/octet-stream"}
252-
response, schemas = response_from_data(
252+
response, _schemas = response_from_data(
253253
status_code=HTTPStatusPattern(pattern="200", code_range=(200, 200)),
254254
data=data,
255255
schemas=Schemas(),

0 commit comments

Comments
 (0)