Skip to content

Commit 7fb1db5

Browse files
committed
add docstring
1 parent c30b3a3 commit 7fb1db5

File tree

2 files changed

+2
-1
lines changed
  • test-data/pybind11_fixtures

2 files changed

+2
-1
lines changed

test-data/pybind11_fixtures/expected_stubs_with_docs/pybind11_fixtures/demo.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ PI: float
66
__version__: str
77

88
class Color(enum.Enum):
9+
"""Color Enum"""
910
__new__: ClassVar[Callable] = ...
1011
GREEN = 1
1112
RED = 0

test-data/pybind11_fixtures/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ void bind_demo(py::module& m) {
236236
py::class_<Point> pyPoint(m, "Point");
237237
py::enum_<Point::LengthUnit> pyLengthUnit(pyPoint, "LengthUnit");
238238
py::enum_<Point::AngleUnit> pyAngleUnit(pyPoint, "AngleUnit");
239-
py::native_enum<Color>(m, "Color", "enum.Enum")
239+
py::native_enum<Color>(m, "Color", "enum.Enum", "Color Enum")
240240
.value("RED", Color::RED)
241241
.value("GREEN", Color::GREEN)
242242
.finalize();

0 commit comments

Comments
 (0)