-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add type information to create_ and add_ method documentation (#620)
Provide type information for the parameters of the ``create_*`` and ``add_*`` methods in the documentation. The ``__signature__`` of the methods is constructed from from the wrapped class's signature, only adding a 'self' parameter. For the ``add_*`` methods, the `Parameters` block (and everything below it) is now also obtained from the class if present. The 'sphinx-autodoc-typehints' extension previously used does not support showing this dynamically created signature, so it was replaced by using the built-in type hint support of 'sphinx.ext.autodoc'. The only drawback is that defaults are now shown only in the signature, and no longer in the description. Since 'sphinx.ext.autodoc' however overwrites the class _parameter_ type hints with the class _attribute_ type hints, the helper function used to generate the signature is monkeypatched. Closes #612
- Loading branch information
Showing
12 changed files
with
368 additions
and
274 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ ACP objects | |
SectionCut | ||
Sensor | ||
SnapToGeometry | ||
SolidModel | ||
SphericalSelectionRule | ||
Stackup | ||
SubLaminate | ||
|
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
Oops, something went wrong.