Update dependencies and fix mypy checks

This commit is contained in:
Alex Root Junior 2022-02-17 01:08:19 +02:00
parent d9a92e2c3c
commit 17d8c0b58f
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
4 changed files with 425 additions and 383 deletions

View file

@ -311,7 +311,9 @@ class Bot(ContextInstanceMixin["Bot"]):
if isinstance(file, str):
file_id = file
else:
file_id = getattr(file, "file_id", None)
# type is ignored in due to:
# Incompatible types in assignment (expression has type "Optional[Any]", variable has type "str")
file_id = getattr(file, "file_id", None) # type: ignore
if file_id is None:
raise TypeError("file can only be of the string or Downloadable type")

View file

@ -1,7 +1,7 @@
from __future__ import annotations
import contextvars
from typing import TYPE_CHECKING, Any, ClassVar, Dict, Generic, Optional, TypeVar, cast, overload
from typing import TYPE_CHECKING, Any, Dict, Generic, Optional, TypeVar, cast, overload
if TYPE_CHECKING:
from typing_extensions import Literal
@ -38,7 +38,7 @@ ContextInstance = TypeVar("ContextInstance")
class ContextInstanceMixin(Generic[ContextInstance]):
__context_instance: ClassVar[contextvars.ContextVar[ContextInstance]]
__context_instance: contextvars.ContextVar[ContextInstance]
def __init_subclass__(cls, **kwargs: Any) -> None:
super().__init_subclass__()

749
poetry.lock generated

File diff suppressed because it is too large Load diff

View file

@ -37,54 +37,55 @@ classifiers = [
[tool.poetry.dependencies]
python = "^3.8"
magic-filter = "^1.0.4"
aiohttp = "^3.8.0"
pydantic = "^1.8.2"
aiofiles = "^0.7.0"
magic-filter = "^1.0.5"
aiohttp = "^3.8.1"
pydantic = "^1.9.0"
aiofiles = "^0.8.0"
# Fast
uvloop = { version = "^0.16.0", markers = "sys_platform == 'darwin' or sys_platform == 'linux'", optional = true }
# i18n
Babel = { version = "^2.9.1", optional = true }
# Proxy
aiohttp-socks = { version = "^0.5.5", optional = true }
aiohttp-socks = {version = "^0.7.1", optional = true}
# Redis
aioredis = {version = "^2.0.1", optional = true}
# Docs
Sphinx = { version = "^4.2.0", optional = true }
sphinx-intl = { version = "^2.0.1", optional = true }
sphinx-autobuild = { version = "^2021.3.14", optional = true }
sphinx-copybutton = { version = "^0.4.0", optional = true }
furo = { version = "^2021.9.8", optional = true }
sphinx-copybutton = {version = "^0.5.0", optional = true}
furo = {version = "^2022.2.14", optional = true}
sphinx-prompt = { version = "^1.5.0", optional = true }
Sphinx-Substitution-Extensions = { version = "^2020.9.30", optional = true }
towncrier = { version = "^21.3.0", optional = true }
towncrier = {version = "^21.9.0", optional = true}
pygments = { version = "^2.4", optional = true }
pymdown-extensions = { version = "^8.0", optional = true }
pymdown-extensions = {version = "^9.2", optional = true}
markdown-include = { version = "^0.6", optional = true }
Pygments = {version = "^2.11.2", optional = true}
[tool.poetry.dev-dependencies]
ipython = "^7.22.0"
black = "^21.4b2"
isort = "^5.8.0"
flake8 = "^3.9.1"
ipython = "^8.0.1"
black = "^22.1.0"
isort = "^5.10.1"
flake8 = "^4.0.1"
flake8-html = "^0.4.1"
mypy = "^0.910"
pytest = "^6.2.3"
mypy = "^0.931"
pytest = "^7.0.1"
pytest-html = "^3.1.1"
pytest-asyncio = "^0.15.1"
pytest-asyncio = "^0.18.1"
pytest-lazy-fixture = "^0.6.3"
pytest-mock = "^3.6.0"
pytest-mypy = "^0.8.1"
pytest-cov = "^2.11.1"
pytest-aiohttp = "^0.3.0"
aresponses = "^2.1.4"
pytest-mock = "^3.7.0"
pytest-mypy = "^0.9.1"
pytest-cov = "^3.0.0"
pytest-aiohttp = "^1.0.4"
aresponses = "^2.1.5"
asynctest = "^0.13.0"
toml = "^0.10.2"
pre-commit = "^2.15.0"
packaging = "^20.3"
typing-extensions = "^3.7.4"
sentry-sdk = "^1.5.3"
pre-commit = "^2.17.0"
packaging = "^21.3"
typing-extensions = "^4.1.1"
sentry-sdk = "^1.5.5"
[tool.poetry.extras]