Skip to content

Commit fa99702

Browse files
[pre-commit.ci] auto fixes from pre-commit.ci hooks
1 parent fc8fa73 commit fa99702

File tree

11 files changed

+9
-23
lines changed

11 files changed

+9
-23
lines changed

docs/source/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import sys
1414
import datetime
1515

16-
1716
sys.path.append(str(p := (Path(".").absolute() / "_ext")))
1817
assert p.exists(), f"{p} {os.getcwd()}"
1918

src/aiopenapi3/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
RequestError,
1414
)
1515

16-
1716
__all__ = [
1817
"__version__",
1918
"OpenAPI",

src/aiopenapi3/openapi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
from .v30.paths import Operation
3434
from .model import is_basemodel, Model
3535

36-
3736
if typing.TYPE_CHECKING:
3837
from ._types import (
3938
RootType,

src/aiopenapi3/request.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
from aiopenapi3.errors import ContentLengthExceededError
1313

14-
1514
try:
1615
from contextlib import aclosing
1716
except: # <= Python 3.10
@@ -369,7 +368,7 @@ def __init__(self, oi: "OperationIndex") -> None:
369368
)
370369

371370
def __getattr__(self, item) -> RequestBase:
372-
(method, path, op, servers) = self._operations[item]
371+
method, path, op, servers = self._operations[item]
373372
return self._oi._api._createRequest(self._oi._api, method, path, op, servers)
374373

375374
class Iter:
@@ -448,7 +447,7 @@ def __getattr__(self, item: str) -> "RequestType":
448447
if self._use_operation_tags and item in self._tags:
449448
return self._tags[item]
450449
elif item in self._operations:
451-
(method, path, op, servers) = self._operations[item]
450+
method, path, op, servers = self._operations[item]
452451
return self._api._createRequest(self._api, method, path, op, servers)
453452
else:
454453
raise KeyError(f"operationId {item} not found in tags or operations")

src/aiopenapi3/v30/formdata.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from .parameter import encode_parameter
99

10-
1110
if TYPE_CHECKING:
1211
from pydantic import BaseModel
1312
from .._types import MediaTypeType, SchemaType

src/aiopenapi3/v30/general.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from ..base import ObjectExtended, ObjectBase, ReferenceBase
88

9-
109
if typing.TYPE_CHECKING:
1110
from .schemas import Schema
1211
from .parameter import Parameter

src/aiopenapi3/v30/glue.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,11 @@ def _prepare_body(self, data_: Optional["RequestData"], rbq: dict[str, str]) ->
400400
alias = fh = content_type = None
401401
headers: dict[str, str] = {}
402402
if len(value) == 4:
403-
(alias, fh, content_type, headers) = cast(tuple[str, Any, str, dict[str, str]], value)
403+
alias, fh, content_type, headers = cast(tuple[str, Any, str, dict[str, str]], value)
404404
elif len(value) == 3:
405-
(alias, fh, content_type) = cast(tuple[str, Any, str], value)
405+
alias, fh, content_type = cast(tuple[str, Any, str], value)
406406
elif len(value) == 2:
407-
(alias, fh) = cast(tuple[str, Any], value)
407+
alias, fh = cast(tuple[str, Any], value)
408408
elif len(value) == 1:
409409
fh = cast(Any, value)
410410

tests/content_length_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import aiopenapi3
1616

17-
1817
app = FastAPI(version="1.0.0", title="TLS tests", servers=[{"url": "/", "description": "Default, relative server"}])
1918

2019

tests/formdata_test.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,13 @@ def test_formdata_encoding(httpx_mock, with_paths_requestbody_formdata_encoding)
5454

5555
content = request.content.decode()
5656

57-
msg = email.message_from_string(
58-
f"""\
57+
msg = email.message_from_string(f"""\
5958
MIME-Version: 1.0
6059
Content-Type: {request.headers["content-type"]}
6160
6261
{content}
6362
64-
"""
65-
)
63+
""")
6664
assert msg.defects == [] and msg.is_multipart()
6765

6866
r = dict()

tests/stream_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import aiopenapi3
2121

22-
2322
app = FastAPI(version="1.0.0", title="TLS tests", servers=[{"url": "/", "description": "Default, relative server"}])
2423

2524

0 commit comments

Comments
 (0)