mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
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:
@@ -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() == []
|
||||
|
||||
Reference in New Issue
Block a user