Show constructors#681
Merged
Merged
Conversation
…tected constructor Function.
…fter the fourth parameter.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #681 +/- ##
==========================================
+ Coverage 92.45% 92.47% +0.02%
==========================================
Files 47 47
Lines 8081 8170 +89
Branches 1922 1948 +26
==========================================
+ Hits 7471 7555 +84
- Misses 355 358 +3
- Partials 255 257 +2
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the core of PR #656, but without the attrs support, which will come after.
Looks like this:
Ideally we would use a presentation that could show parameters types on mouse over, but we’d need to do more work. Right now it uses the rst parser to produce the Stan. So it’s rather inflexible. But it can be improved later by directly generate Stan.
Currently it shows the constructor functions induces by init or new methods as well as class methods that uses self reference type hint as the return type.
A possible improvement would be to support inherited class method constructors if it returns the self type (whether it’s by the Self annotation or returning cls()).
Also it would be good to hide the constructors that don’t have any docstring and no arguments, because it’s the default constructor.