Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stubs/channels/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version = "4.3.*"
upstream-repository = "https://github.com/django/channels"
dependencies = ["django-stubs>=4.2", "asgiref"]
dependencies = ["django-stubs>=6.0.3", "asgiref"]

[tool.stubtest]
mypy-plugins = ['mypy_django_plugin.main']
Expand Down
4 changes: 3 additions & 1 deletion stubs/channels/channels/auth.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from _typeshed import Incomplete

from asgiref.typing import ASGIReceiveCallable, ASGISendCallable
from channels.middleware import BaseMiddleware
from django.contrib.auth.backends import BaseBackend
Expand All @@ -14,7 +16,7 @@ async def logout(scope: _ChannelScope) -> None: ...

# Inherits AbstractBaseUser to improve autocomplete and show this is a lazy proxy for a user.
# At runtime, it's just a LazyObject that wraps the actual user instance.
class UserLazyObject(AbstractBaseUser, LazyObject): ...
class UserLazyObject(AbstractBaseUser, LazyObject[Incomplete]): ...

class AuthMiddleware(BaseMiddleware):
def populate_scope(self, scope: _ChannelScope) -> None: ...
Expand Down
3 changes: 2 additions & 1 deletion stubs/channels/channels/consumer.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from _typeshed import Incomplete
from collections.abc import Awaitable
from typing import Any, ClassVar, Protocol, TypedDict, type_check_only

Expand All @@ -11,7 +12,7 @@ from django.utils.functional import LazyObject
# We subclass both for type checking purposes to expose SessionBase attributes,
# and suppress mypy's "misc" error with `# type: ignore[misc]`.
@type_check_only
class _LazySession(SessionBase, LazyObject): # type: ignore[misc]
class _LazySession(SessionBase, LazyObject[Incomplete]): # type: ignore[misc]
_wrapped: SessionBase

@type_check_only
Expand Down