-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not repeat identical docstrings in long overload chains
In auto-generated C++ bindings, we might sometimes have a long chain of overloads that bind a function with differently typed arguments, and which are all created with the same per-overload docstring. Previously, nanobind extended this into a long and highly redundant combined docstring that showed both type signatures and docstrings multiple times. ``` f(.. signature 1..) f(.. signature 2..) This is an overloaded function. 1. ``f(.. signature 1..)`` Docstring 1. ``f(.. signature 2..)`` Docstring ``` Nanobind now detects situations where the per-overload docstrings are all uniform, in which case it generates ``` f(.. signature 1..) f(.. signature 2..) Docstring ```
- Loading branch information
Showing
5 changed files
with
67 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters