diff --git a/pyproject.toml b/pyproject.toml index ae9f8ae..7abea59 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ "pydantic>=2.12; python_version >= '3.14'", "aiohttp>=3.10.5; python_version == '3.13'", "aiohttp>=3.13; python_version >= '3.14'", - "modern-di>=3,<4", + "modern-di>=4,<5", ] version = "0" diff --git a/tests/dependencies.py b/tests/dependencies.py index 1f2401b..a76a7f3 100644 --- a/tests/dependencies.py +++ b/tests/dependencies.py @@ -14,11 +14,8 @@ class DependentCreator: dep1: SimpleCreator -def fetch_event_type(event: TelegramObject | None = None) -> str: - # Optional-with-default so an explicit container.validate() treats the event - # as optional (the providers are only registered by setup_di); the real - # event still injects at runtime. - return type(event).__name__ if event else "" +def fetch_event_type(event: TelegramObject) -> str: + return type(event).__name__ class Dependencies(Group):