mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 23:22:01 +00:00
Fix handle_type_name<anyset>
as suggested by @sizmailov:
https://github.com/pybind/pybind11/pull/4888#discussion_r1367775289 NOTE: This is actually a bug fix, in its own right.
This commit is contained in:
parent
199532e989
commit
7280380378
@ -888,6 +888,10 @@ struct handle_type_name<dict> {
|
|||||||
static constexpr auto name = const_name("dict");
|
static constexpr auto name = const_name("dict");
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
|
struct handle_type_name<anyset> {
|
||||||
|
static constexpr auto name = const_name("set");
|
||||||
|
};
|
||||||
|
template <>
|
||||||
struct handle_type_name<set> {
|
struct handle_type_name<set> {
|
||||||
static constexpr auto name = const_name("set");
|
static constexpr auto name = const_name("set");
|
||||||
};
|
};
|
||||||
@ -896,10 +900,6 @@ struct handle_type_name<frozenset> {
|
|||||||
static constexpr auto name = const_name("frozenset");
|
static constexpr auto name = const_name("frozenset");
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct handle_type_name<anyset> {
|
|
||||||
static constexpr auto name = const_name("anyset");
|
|
||||||
};
|
|
||||||
template <>
|
|
||||||
struct handle_type_name<str> {
|
struct handle_type_name<str> {
|
||||||
static constexpr auto name = const_name("str");
|
static constexpr auto name = const_name("str");
|
||||||
};
|
};
|
||||||
|
@ -121,7 +121,7 @@ def test_set(capture, doc):
|
|||||||
assert m.anyset_contains({"foo"}, "foo")
|
assert m.anyset_contains({"foo"}, "foo")
|
||||||
|
|
||||||
assert doc(m.get_set) == "get_set() -> set"
|
assert doc(m.get_set) == "get_set() -> set"
|
||||||
assert doc(m.print_anyset) == "print_anyset(arg0: anyset) -> None"
|
assert doc(m.print_anyset) == "print_anyset(arg0: set) -> None"
|
||||||
|
|
||||||
|
|
||||||
def test_frozenset(capture, doc):
|
def test_frozenset(capture, doc):
|
||||||
|
Loading…
Reference in New Issue
Block a user