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 15, 2024
1 parent d0c9d05 commit c88b713
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_pytypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,8 @@ TEST_SUBMODULE(pytypes, m) {

m.def("annotate_complete_literal", [](literals::LiteralFoo &o) -> py::object { return o; });


m.def("annotate_only_string_literal", [](py::typing::Literal<"hi">&o) -> py::object { return o; });
m.def("annotate_only_string_literal",
[](py::typing::Literal<"hi"> &o) -> py::object { return o; });

m.def("annotate_generic_containers",
[](const py::typing::List<typevar::TypeVarT> &l) -> py::typing::List<typevar::TypeVarV> {
Expand Down
2 changes: 2 additions & 0 deletions tests/test_pytypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ def test_complete_literal(doc):
== 'annotate_complete_literal(arg0: Literal[26, 20, "hello world", b"hello world", u"hello world", True, Color.RED, None]) -> object'
)


@pytest.mark.skipif(
not m.defined_PYBIND11_TYPING_H_HAS_STRING_LITERAL,
reason="C++20 non-type template args feature not available.",
Expand All @@ -1066,6 +1067,7 @@ def annotate_only_string_literal(doc):
== 'annotate_only_string_literal(arg0: Literal["Hi"]) -> object'
)


@pytest.mark.skipif(
not m.defined_PYBIND11_TYPING_H_HAS_STRING_LITERAL,
reason="C++20 non-type template args feature not available.",
Expand Down

0 comments on commit c88b713

Please sign in to comment.