Render py::bool_ and py::float_ without _ in docstrings (#3622)

* Render `py::bool_` as `bool` in docstrings

* Render `py::float_` as `float` in docstrings
This commit is contained in:
Sergei Izmailov
2022-01-16 18:05:46 +03:00
committed by GitHub
parent 7e7c558530
commit 5194855900
3 changed files with 14 additions and 0 deletions

View File

@@ -10,6 +10,10 @@ from pybind11_tests import debug_enabled
from pybind11_tests import pytypes as m
def test_bool(doc):
assert doc(m.get_bool) == "get_bool() -> bool"
def test_int(doc):
assert doc(m.get_int) == "get_int() -> int"
@@ -22,6 +26,10 @@ def test_iterable(doc):
assert doc(m.get_iterable) == "get_iterable() -> Iterable"
def test_float(doc):
assert doc(m.get_float) == "get_float() -> float"
def test_list(capture, doc):
assert m.list_no_args() == []
assert m.list_ssize_t() == []