-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stubgenc: Introduce an object-oriented system for extracting function…
… signatures (#13473) Note: This change is part of a series of upcoming MRs to improve `stubgenc`. `stubgenc` tries 3 approaches to infer signatures for a function. There are two problems with the current design: 1. the logic for how these approaches are applied is somewhat convoluted, to the point that it's not even clear at first that there are 3 distinct approaches (from rst files, from docstrings, fallback guess). 2. there's not a clear path for how a developer would create a new approach. This MR has two commits: 1. implement the object-oriented inference system: this change is designed to preserve the current behavior so required no changes to test behavior 2. fix a bug where `@classmethod` and self-var fixes were not applied to every overload. tests have been updated and a new test added to reflect the change.
- Loading branch information
Showing
3 changed files
with
361 additions
and
96 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
Oops, something went wrong.