Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Dec 21, 2024
1 parent e1e2c9a commit 2774a8d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_pytypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,19 +1120,24 @@ def test_module_attribute_types() -> None:
assert module_annotations["list_int"] == "list[int]"
assert module_annotations["set_str"] == "set[str]"


@pytest.mark.skipif(
not m.defined___cpp_inline_variables,
reason="C++17 feature __cpp_inline_variables not available.",
)
@pytest.mark.skipif(sys.version_info < (3, 10),
reason="get_annotations function does not exist until Python3.10")
@pytest.mark.skipif(
sys.version_info < (3, 10),
reason="get_annotations function does not exist until Python3.10",
)
def test_get_annotations_compliance() -> None:
from inspect import get_annotations

module_annotations = get_annotations(m)

assert module_annotations["list_int"] == "list[int]"
assert module_annotations["set_str"] == "set[str]"


@pytest.mark.skipif(
not m.defined___cpp_inline_variables,
reason="C++17 feature __cpp_inline_variables not available.",
Expand Down

0 comments on commit 2774a8d

Please sign in to comment.