From 65091c801584a6cef2a15997baad64850c5f209b Mon Sep 17 00:00:00 2001 From: Haohan Yang Date: Wed, 13 Nov 2024 22:31:06 +0100 Subject: [PATCH 1/2] Add type stub --- src/scikit_build_example/__init__.pyi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/scikit_build_example/__init__.pyi diff --git a/src/scikit_build_example/__init__.pyi b/src/scikit_build_example/__init__.pyi new file mode 100644 index 0000000..08731c3 --- /dev/null +++ b/src/scikit_build_example/__init__.pyi @@ -0,0 +1,20 @@ +""" +Pybind11 example plugin +----------------------- + +.. currentmodule:: scikit_build_example + +.. autosummary:: + :toctree: _generate + + add + subtract +""" + +def add(i: int, j: int) -> int: + """ + Add two numbers + + Some other explanation about the add function. + """ + ... From fe12201e9ee20863829d63808ed7e9509f91f716 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 21:36:24 +0000 Subject: [PATCH 2/2] style: pre-commit fixes --- src/scikit_build_example/__init__.pyi | 1 - 1 file changed, 1 deletion(-) diff --git a/src/scikit_build_example/__init__.pyi b/src/scikit_build_example/__init__.pyi index 08731c3..79a83e2 100644 --- a/src/scikit_build_example/__init__.pyi +++ b/src/scikit_build_example/__init__.pyi @@ -17,4 +17,3 @@ def add(i: int, j: int) -> int: Some other explanation about the add function. """ - ...