-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Enable missing docstrings check #6073
Conversation
Hi @vibhor98 failing lint checks... I think you need add docstrings in a few more locations. |
Codecov Report
@@ Coverage Diff @@
## develop #6073 +/- ##
========================================
Coverage 45.21% 45.21%
========================================
Files 523 523
Lines 30722 30722
Branches 4605 4605
========================================
Hits 13892 13892
Misses 16830 16830 Continue to review full report at Codecov.
|
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.
I think this PR looks ok. Finally we finish the docstrings :) Great work @vibhor98! Left a few comments
Hi @seanlip, Can you review this PR as all lint checks have been passed? Thanks! |
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.
Almost there!
Please resolve @nithusha21's comments too.
@@ -203,6 +203,9 @@ def test_interaction_properties(self): | |||
def test_interaction_rules(self): | |||
"""Tests the interaction rules.""" | |||
def _check_num_interaction_rules(interaction_id, expected_num): | |||
"""Checks the number of rules in the interaction corresponding to |
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.
Missing args section
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.
Done
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.
I thought you said test files didn't need args/returns/raises. Does the linter fail if the test files don't have all the sections of the docstring? If not, can you point me to the code that skips checking these sections on test files?
/cc @apb7
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.
Yeah, they're optional. No, the linter doesn't fail as we don't have explicit checks for missing Args and Return sections yet.
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. Congrats @vibhor98!
Also, some questions Now what is the behavior of the linter?
Could you or @apb7 clarify here? Thanks! |
Hi @nithusha21, now the linter will raise errors for missing docstrings for all the non-test and test Python files. But we don't have explicit checks for missing sections yet. Thanks! |
Ah I see, Thanks for confirming. I think this can be merged as #6081 tracks the different sections issue. |
Thanks for completing this! @vibhor98 |
Explanation
Checklist
python scripts/pre_commit_linter.py
andbash scripts/run_frontend_tests.sh
.