Skip to content

Commit

Permalink
Add a few type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
bluetech committed Sep 2, 2024
1 parent d878d56 commit 089843c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pytest_django/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def tearDownClass(cls) -> None:
django_db_blocker.restore()


def validate_django_db(marker) -> _DjangoDb:
def validate_django_db(marker: pytest.Mark) -> _DjangoDb:
"""Validate the django_db marker.
It checks the signature and creates the ``transaction``,
Expand Down
4 changes: 2 additions & 2 deletions pytest_django/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ def django_mail_dnsname() -> str:
@pytest.fixture(autouse=True)
def _django_set_urlconf(request: pytest.FixtureRequest) -> Generator[None, None, None]:
"""Apply the @pytest.mark.urls marker, internal to pytest-django."""
marker = request.node.get_closest_marker("urls")
marker: pytest.Mark | None = request.node.get_closest_marker("urls")
if marker:
skip_if_no_django()
import django.conf
Expand Down Expand Up @@ -836,7 +836,7 @@ def restore(self) -> None:
blocking_manager_key = pytest.StashKey[DjangoDbBlocker]()


def validate_urls(marker) -> list[str]:
def validate_urls(marker: pytest.Mark) -> list[str]:
"""Validate the urls marker.
It checks the signature and creates the `urls` attribute on the
Expand Down

0 comments on commit 089843c

Please sign in to comment.