Skip to content

Commit 4690c72

Browse files
committed
Add stubtest
1 parent 76842c8 commit 4690c72

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
SECRET_KEY = "1"
2+
3+
INSTALLED_APPS = (
4+
"django.contrib.contenttypes",
5+
"django.contrib.sites",
6+
"django.contrib.sessions",
7+
"django.contrib.messages",
8+
"django.contrib.admin.apps.SimpleAdminConfig",
9+
"django.contrib.staticfiles",
10+
"django.contrib.auth",
11+
"channels",
12+
)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
channels.auth.UserLazyObject
2+
channels.auth.UserLazyObject.*
3+
channels.db.database_sync_to_async

stubs/channels/METADATA.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ upstream_repository = "https://github.com/django/channels"
33
requires = ["django-stubs>=4.2,<5.3", "asgiref"]
44

55
[tool.stubtest]
6-
skip = true # TODO: enable stubtest once Django mypy plugin config is supported
6+
mypy_plugins = ['mypy_django_plugin.main']
7+
mypy_plugins_config = {"django-stubs" = {"django_settings_module" = "@tests.django_settings"}}
78
stubtest_requirements = ["daphne"]

0 commit comments

Comments
 (0)