Skip to content

Commit 77f2170

Browse files
authored
Upgrade django-stubs (#828)
1 parent ffb8072 commit 77f2170

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ repos:
5858
hooks:
5959
- id: mypy
6060
additional_dependencies:
61-
- django-stubs==1.13.0
61+
- django-stubs==1.14.0

src/corsheaders/checks.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from typing import Any
66
from urllib.parse import urlsplit
77

8-
from django.apps import AppConfig
98
from django.conf import settings
109
from django.core.checks import CheckMessage
1110
from django.core.checks import Error
@@ -15,7 +14,7 @@
1514
re_type = type(re.compile(""))
1615

1716

18-
def check_settings(app_configs: list[AppConfig], **kwargs: Any) -> list[CheckMessage]:
17+
def check_settings(**kwargs: Any) -> list[CheckMessage]:
1918
errors: list[CheckMessage] = []
2019

2120
if not is_sequence(conf.CORS_ALLOW_HEADERS, str):

tests/test_checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class ChecksTests(SimpleTestCase):
1717
def check_error_codes(self, expected: list[str]) -> list[CheckMessage]:
18-
errors = check_settings([])
18+
errors = check_settings()
1919
assert len(errors) == len(expected)
2020
assert all(isinstance(e, Error) for e in errors)
2121
assert [e.id for e in errors] == expected

0 commit comments

Comments
 (0)