mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 15:12:01 +00:00
Render anyset
as set | frozenset
as suggested by @sizmailov:
https://github.com/pybind/pybind11/pull/4888#discussion_r1367785281
This commit is contained in:
parent
70a510c305
commit
ace70b077f
@ -889,7 +889,7 @@ struct handle_type_name<dict> {
|
||||
};
|
||||
template <>
|
||||
struct handle_type_name<anyset> {
|
||||
static constexpr auto name = const_name("set");
|
||||
static constexpr auto name = const_name("set | frozenset");
|
||||
};
|
||||
template <>
|
||||
struct handle_type_name<set> {
|
||||
|
@ -121,7 +121,7 @@ def test_set(capture, doc):
|
||||
assert m.anyset_contains({"foo"}, "foo")
|
||||
|
||||
assert doc(m.get_set) == "get_set() -> set"
|
||||
assert doc(m.print_anyset) == "print_anyset(arg0: set) -> None"
|
||||
assert doc(m.print_anyset) == "print_anyset(arg0: set | frozenset) -> None"
|
||||
|
||||
|
||||
def test_frozenset(capture, doc):
|
||||
|
Loading…
Reference in New Issue
Block a user