Typing issues fixed.
This commit is contained in:
parent
1afea39cb2
commit
6ea5c44566
|
@ -133,7 +133,7 @@ if use_trio: # pragma: no cover
|
|||
return trio.Path(path).stat()
|
||||
|
||||
open_async = trio.open_file
|
||||
CancelledErrors = (asyncio.CancelledError, trio.Cancelled)
|
||||
CancelledErrors: tuple[type[BaseException], ...] = (asyncio.CancelledError, trio.Cancelled)
|
||||
else:
|
||||
if PYPY_IMPLEMENTATION:
|
||||
pypy_os_module_patch()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from asyncio import BaseTransport
|
||||
from typing import TYPE_CHECKING, AnyStr
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from sanic.http.constants import HTTP
|
||||
|
@ -12,10 +12,10 @@ from typing import Protocol
|
|||
|
||||
|
||||
class HTMLProtocol(Protocol):
|
||||
def __html__(self) -> AnyStr:
|
||||
def __html__(self) -> str:
|
||||
...
|
||||
|
||||
def _repr_html_(self) -> AnyStr:
|
||||
def _repr_html_(self) -> str:
|
||||
...
|
||||
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ class SanicProtocol(asyncio.Protocol):
|
|||
self._can_write = asyncio.Event()
|
||||
self._can_write.set()
|
||||
self._unix = unix
|
||||
self._time = 0.0 # type: float
|
||||
self._task = None # type: Optional[asyncio.Task]
|
||||
self._time = 0.0
|
||||
self._task: asyncio.Task | None = None
|
||||
self._data_received = asyncio.Event()
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in New Issue
Block a user