-
Notifications
You must be signed in to change notification settings - Fork 53
add function and variable annotations #645
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
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## typing #645 +/- ##
==========================================
- Coverage 74.97% 74.94% -0.04%
==========================================
Files 113 114 +1
Lines 8048 8177 +129
==========================================
+ Hits 6034 6128 +94
- Misses 2014 2049 +35
☔ View full report in Codecov by Sentry. |
|
Thanks a lot @alchemistcai for putting the effort on this! I not only think that adding the types is a good idea but I also think we should add I'll go over your changes in the coming days, for now I've merged the main into this PR since there were some conflicts after #649 *I've also added a |
|
Sorry for the delay in handling this one. It has become a huge atomic PR, so I have rebased it to haddocking:typing and will continue in a separate PR to check for issues (so we can run the full set of actions) Thanks again @alchemistcai! |
Add most function and variable annotations for haddock.
Add
src/haddock/core/typing.pyto contain relative definations.Adjust some functions to accept both
Pathandstrwhen docstrings say they acceptPathandstrwhile the code only acceptstr, and other situations like this.Alter some lists to generators when they are used only once.
Known issues:I can't infer types of
haddock.libs.libontology.PDBFile.topology,ModuleIO.input,ModuleIO.outputand relative functions.They seem to have many types.I have to say that adding annotations for haddock is not an esay job,maybe even not a good idea.Feel free to join this discussion to show your opinion about type annotations #637 👀 .