databases[sqlite]==0.5.3
flake8==4.0.1
isort==5.10.1
-mypy==0.930
+mypy==0.931
types-requests==2.26.3
types-contextvars==2.4.0
types-PyYAML==6.0.1
def __new__(cls, path: str, protocol: str = "", host: str = "") -> "URLPath":
assert protocol in ("http", "websocket", "")
- return str.__new__(cls, path) # type: ignore
+ return str.__new__(cls, path)
def __init__(self, path: str, protocol: str = "", host: str = "") -> None:
self.protocol = protocol
async def write(self, data: bytes) -> None:
if self._in_memory:
- self.file.write(data) # type: ignore
+ self.file.write(data)
else:
await run_in_threadpool(self.file.write, data)
import gzip
import io
+import typing
from starlette.datastructures import Headers, MutableHeaders
from starlette.types import ASGIApp, Message, Receive, Scope, Send
await self.send(message)
-async def unattached_send(message: Message) -> None:
+async def unattached_send(message: Message) -> typing.NoReturn:
raise RuntimeError("send awaitable not set") # pragma: no cover
key, val = key.strip(), val.strip()
if key or val:
# unquote using Python's algorithm.
- cookie_dict[key] = http_cookies._unquote(val) # type: ignore
+ cookie_dict[key] = http_cookies._unquote(val)
return cookie_dict
return url_path.make_absolute_url(base_url=self.base_url)
-async def empty_receive() -> Message:
+async def empty_receive() -> typing.NoReturn:
raise RuntimeError("Receive channel has not been made available")
-async def empty_send(message: Message) -> None:
+async def empty_send(message: Message) -> typing.NoReturn:
raise RuntimeError("Send channel has not been made available")