Skip to content

Commit

Permalink
Upgrade django-stubs (#828)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz committed Jan 28, 2023
1 parent ffb8072 commit 77f2170
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ repos:
hooks:
- id: mypy
additional_dependencies:
- django-stubs==1.13.0
- django-stubs==1.14.0
3 changes: 1 addition & 2 deletions src/corsheaders/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from typing import Any
from urllib.parse import urlsplit

from django.apps import AppConfig
from django.conf import settings
from django.core.checks import CheckMessage
from django.core.checks import Error
Expand All @@ -15,7 +14,7 @@
re_type = type(re.compile(""))


def check_settings(app_configs: list[AppConfig], **kwargs: Any) -> list[CheckMessage]:
def check_settings(**kwargs: Any) -> list[CheckMessage]:
errors: list[CheckMessage] = []

if not is_sequence(conf.CORS_ALLOW_HEADERS, str):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class ChecksTests(SimpleTestCase):
def check_error_codes(self, expected: list[str]) -> list[CheckMessage]:
errors = check_settings([])
errors = check_settings()
assert len(errors) == len(expected)
assert all(isinstance(e, Error) for e in errors)
assert [e.id for e in errors] == expected
Expand Down

0 comments on commit 77f2170

Please sign in to comment.