Use Union[set, frozenset] for internal consistency.

This commit is contained in:
Ralf W. Grosse-Kunstleve 2023-10-21 13:03:25 -07:00
parent ace70b077f
commit 7c8991a0a0
2 changed files with 2 additions and 2 deletions

View File

@ -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> {

View File

@ -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):