-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show constructors #681
Show constructors #681
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's land it!
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.