Skip to content

Commit 089843c

Browse files
committed
Add a few type annotations
1 parent d878d56 commit 089843c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pytest_django/fixtures.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def tearDownClass(cls) -> None:
266266
django_db_blocker.restore()
267267

268268

269-
def validate_django_db(marker) -> _DjangoDb:
269+
def validate_django_db(marker: pytest.Mark) -> _DjangoDb:
270270
"""Validate the django_db marker.
271271
272272
It checks the signature and creates the ``transaction``,

pytest_django/plugin.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ def django_mail_dnsname() -> str:
617617
@pytest.fixture(autouse=True)
618618
def _django_set_urlconf(request: pytest.FixtureRequest) -> Generator[None, None, None]:
619619
"""Apply the @pytest.mark.urls marker, internal to pytest-django."""
620-
marker = request.node.get_closest_marker("urls")
620+
marker: pytest.Mark | None = request.node.get_closest_marker("urls")
621621
if marker:
622622
skip_if_no_django()
623623
import django.conf
@@ -836,7 +836,7 @@ def restore(self) -> None:
836836
blocking_manager_key = pytest.StashKey[DjangoDbBlocker]()
837837

838838

839-
def validate_urls(marker) -> list[str]:
839+
def validate_urls(marker: pytest.Mark) -> list[str]:
840840
"""Validate the urls marker.
841841
842842
It checks the signature and creates the `urls` attribute on the

0 commit comments

Comments
 (0)