Skip to content

Commit

Permalink
[lint] run mypy on tests/test_addnodes.py (#12111)
Browse files Browse the repository at this point in the history
  • Loading branch information
picnixz committed Mar 16, 2024
1 parent b0ded2e commit 57e302e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ disallow_any_generics = false
module = [
# tests/
# "tests.conftest",
"tests.test_addnodes",
"tests.test_errors",
"tests.test_events",
"tests.test_highlighting",
Expand Down
7 changes: 6 additions & 1 deletion tests/test_addnodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@

from __future__ import annotations

from typing import TYPE_CHECKING

import pytest

from sphinx import addnodes

if TYPE_CHECKING:
from collections.abc import Generator


@pytest.fixture()
def sig_elements() -> set[type[addnodes.desc_sig_element]]:
def sig_elements() -> Generator[set[type[addnodes.desc_sig_element]], None, None]:
"""Fixture returning the current ``addnodes.SIG_ELEMENTS`` set."""
original = addnodes.SIG_ELEMENTS.copy() # safe copy of the current nodes
yield {*addnodes.SIG_ELEMENTS} # temporary value to use during tests
Expand Down

0 comments on commit 57e302e

Please sign in to comment.