mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 07:02:11 +00:00
Use Union[set, frozenset]
for internal consistency.
This commit is contained in:
parent
ace70b077f
commit
7c8991a0a0
@ -889,7 +889,7 @@ struct handle_type_name<dict> {
|
||||
};
|
||||
template <>
|
||||
struct handle_type_name<anyset> {
|
||||
static constexpr auto name = const_name("set | frozenset");
|
||||
static constexpr auto name = const_name("Union[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 | frozenset) -> None"
|
||||
assert doc(m.print_anyset) == "print_anyset(arg0: Union[set, frozenset]) -> None"
|
||||
|
||||
|
||||
def test_frozenset(capture, doc):
|
||||
|
Loading…
Reference in New Issue
Block a user