File tree 3 files changed +7
-0
lines changed
3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -770,6 +770,7 @@ template <> struct handle_type_name<bytes> { static constexpr auto name = const_
770
770
template <> struct handle_type_name <int_> { static constexpr auto name = const_name(" int" ); };
771
771
template <> struct handle_type_name <iterable> { static constexpr auto name = const_name(" Iterable" ); };
772
772
template <> struct handle_type_name <iterator> { static constexpr auto name = const_name(" Iterator" ); };
773
+ template <> struct handle_type_name <float_> { static constexpr auto name = const_name(" float" ); };
773
774
template <> struct handle_type_name <none> { static constexpr auto name = const_name(" None" ); };
774
775
template <> struct handle_type_name <args> { static constexpr auto name = const_name(" *args" ); };
775
776
template <> struct handle_type_name <kwargs> { static constexpr auto name = const_name(" **kwargs" ); };
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ TEST_SUBMODULE(pytypes, m) {
21
21
m.def (" get_iterator" , []{return py::iterator ();});
22
22
// test_iterable
23
23
m.def (" get_iterable" , []{return py::iterable ();});
24
+ // test_float
25
+ m.def (" get_float" , []{return py::float_ (0 .0f );});
24
26
// test_list
25
27
m.def (" list_no_args" , []() { return py::list{}; });
26
28
m.def (" list_ssize_t" , []() { return py::list{(py::ssize_t ) 0 }; });
Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ def test_iterable(doc):
26
26
assert doc (m .get_iterable ) == "get_iterable() -> Iterable"
27
27
28
28
29
+ def test_float (doc ):
30
+ assert doc (m .get_iterable ) == "get_float() -> float"
31
+
32
+
29
33
def test_list (capture , doc ):
30
34
assert m .list_no_args () == []
31
35
assert m .list_ssize_t () == []
You can’t perform that action at this time.
0 commit comments