Skip to content

Commit

Permalink
Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Nov 20, 2021
1 parent d39de83 commit 368446f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aiohttp/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from http.cookies import SimpleCookie
from itertools import cycle, islice
from math import ceil
from numbers import Rational
from numbers import Real
from time import monotonic
from types import TracebackType
from typing import ( # noqa
Expand Down Expand Up @@ -288,7 +288,7 @@ async def _cleanup(self) -> None:
elif delay is None:
delay = 0

assert isinstance(delay, Rational)
assert isinstance(delay, Real), type(delay)
when = now + delay
if delay >= 5: # type: ignore[operator]
when = ceil(when)
Expand Down Expand Up @@ -480,7 +480,7 @@ async def _get(self, key: "ConnectionKey") -> Optional[ResponseHandler]:
proto, t0 = conns.pop()
if proto.is_connected():
if (
not isinstance(keepalive_timeout, Rational)
not isinstance(keepalive_timeout, Real)
or t1 - t0 > keepalive_timeout
):
await proto.close()
Expand Down

0 comments on commit 368446f

Please sign in to comment.