Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert incorrect typing changes #10222

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.13
python-version: 3.11
- name: Cache PyPI
uses: actions/[email protected]
with:
Expand Down
3 changes: 2 additions & 1 deletion .mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ disallow_untyped_calls = True
disallow_untyped_decorators = True
disallow_untyped_defs = True
# TODO(PY312): explicit-override
enable_error_code = ignore-without-code, possibly-undefined, redundant-expr, redundant-self, truthy-bool, truthy-iterable, unused-awaitable
enable_error_code = deprecated, ignore-without-code, possibly-undefined, redundant-expr, redundant-self, truthy-bool, truthy-iterable, unused-awaitable
extra_checks = True
follow_untyped_imports = True
implicit_reexport = False
no_implicit_optional = True
pretty = True
Expand Down
1 change: 0 additions & 1 deletion aiohttp/http_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,6 @@ def feed_data(
) -> Tuple[List[Tuple[RawResponseMessage, StreamReader]], bool, bytes]:
if SEP is None:
SEP = b"\r\n" if DEBUG else b"\n"
assert SEP is not None
return super().feed_data(data, SEP, *args, **kwargs)

def parse_message(self, lines: List[bytes]) -> RawResponseMessage:
Expand Down
4 changes: 2 additions & 2 deletions aiohttp/web_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,13 +583,13 @@ async def start(self) -> None:
else:
task = loop.create_task(coro)
try:
resp, reset = await task # type: ignore[possibly-undefined]
resp, reset = await task
except ConnectionError:
self.log_debug("Ignored premature client disconnection")
break

# Drop the processed task from asyncio.Task.all_tasks() early
del task # type: ignore[possibly-undefined]
del task
# https://github.com/python/mypy/issues/14309
if reset: # type: ignore[possibly-undefined]
self.log_debug("Ignored premature client disconnection 2")
Expand Down
Loading