From 3e2704f870c02aaae7f103cd2523bcff2316b43c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=20=D0=93=D0=BB=D0=B0=D0=B7=D1=83?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2?= Date: Wed, 3 Dec 2025 12:24:41 +0300 Subject: [PATCH] fix linter errors --- pyserve/asgi_mount.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyserve/asgi_mount.py b/pyserve/asgi_mount.py index 84b6ac5..58f6646 100644 --- a/pyserve/asgi_mount.py +++ b/pyserve/asgi_mount.py @@ -17,7 +17,7 @@ logger = get_logger(__name__) class ASGIAppLoader: - def __init__(self): + def __init__(self) -> None: self._apps: Dict[str, ASGIApp] = {} self._wsgi_adapters: Dict[str, ASGIApp] = {} @@ -59,7 +59,7 @@ class ASGIAppLoader: logger.info(f"Wrapped WSGI app: {app_path}") self._apps[app_path] = app - return app + return cast(ASGIApp, app) except ImportError as e: logger.error(f"Failed to import application {app_path}: {e}") @@ -137,7 +137,7 @@ class MountedApp: class ASGIMountManager: - def __init__(self): + def __init__(self) -> None: self._mounts: list[MountedApp] = [] self._loader = ASGIAppLoader() @@ -288,8 +288,8 @@ def create_django_app( os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_module) try: - from django.core.asgi import get_asgi_application - return get_asgi_application() + from django.core.asgi import get_asgi_application # type: ignore[import-untyped] + return cast(ASGIApp, get_asgi_application()) except ImportError as e: logger.error(f"Failed to load Django application: {e}") return None