Skip to content
This repository was archived by the owner on Nov 19, 2023. It is now read-only.

Commit 25b1f06

Browse files
committed
chore: Ignore new linter errors
1 parent 90e87ee commit 25b1f06

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

openapi_tester/loaders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def set_schema(self, schema: dict) -> None:
112112
self.schema = self.normalize_schema_paths(de_referenced_schema)
113113

114114
@cached_property
115-
def endpoints(self) -> list[str]:
115+
def endpoints(self) -> list[str]: # pylint: disable=no-self-use
116116
"""
117117
Returns a list of endpoint paths.
118118
"""

openapi_tester/schema_tester.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ def get_response_schema_section(self, response: Response) -> dict[str, Any]:
117117
:return dict
118118
"""
119119
schema = self.loader.get_schema()
120-
response_method = response.request["REQUEST_METHOD"].lower()
121-
parameterized_path, _ = self.loader.resolve_path(response.request["PATH_INFO"], method=response_method)
120+
response_method = response.request["REQUEST_METHOD"].lower() # type: ignore
121+
parameterized_path, _ = self.loader.resolve_path(
122+
response.request["PATH_INFO"], method=response_method # type: ignore
123+
)
122124
paths_object = self.get_key_value(schema, "paths")
123125

124126
route_object = self.get_key_value(
@@ -160,7 +162,7 @@ def get_response_schema_section(self, response: Response) -> dict[str, Any]:
160162
)
161163
return self.get_key_value(json_object, "schema")
162164

163-
if response.data and response.json():
165+
if response.data and response.json(): # type: ignore
164166
raise UndocumentedSchemaSectionError(
165167
UNDOCUMENTED_SCHEMA_SECTION_ERROR.format(
166168
key="content",
@@ -382,7 +384,7 @@ def validate_response(
382384
response_schema = self.get_response_schema_section(response)
383385
self.test_schema_section(
384386
schema_section=response_schema,
385-
data=response.json() if response.data is not None else {},
387+
data=response.json() if response.data is not None else {}, # type: ignore
386388
case_tester=case_tester or self.case_tester,
387389
ignore_case=ignore_case,
388390
validators=validators,

tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def response_factory(schema: dict | None, url_fragment: str, method: str, status
2020
if schema:
2121
converted_schema = SchemaToPythonConverter(deepcopy(schema)).result
2222
response = Response(status=int(status_code), data=converted_schema)
23-
response.request = {"REQUEST_METHOD": method, "PATH_INFO": url_fragment}
23+
response.request = {"REQUEST_METHOD": method, "PATH_INFO": url_fragment} # type: ignore
2424
if schema:
2525
response.json = lambda: converted_schema # type: ignore
2626
return response

0 commit comments

Comments
 (0)