-
Notifications
You must be signed in to change notification settings - Fork 372
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
Enabled linter on loose files in common. #1976
Enabled linter on loose files in common. #1976
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1976 +/- ##
===========================================
- Coverage 71.15% 71.13% -0.02%
===========================================
Files 86 86
Lines 12285 12286 +1
Branches 1729 1730 +1
===========================================
- Hits 8741 8740 -1
- Misses 3159 3160 +1
- Partials 385 386 +1
Continue to review full report at Codecov.
|
@@ -19,11 +19,11 @@ | |||
|
|||
""" | |||
Module conf loads and parses configuration file | |||
""" | |||
""" # pylint: disable=W0105 |
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.
does this affect the doctring?
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.
The error it is suppressing is:
# pointless-string-statement<W0105>: (hi-pri) Used when a string is used as a statement (which of course has no effect). This is a particular case of W0104 with its own message so you can easily disable it if you're using those strings as documentation, instead of comments.
I'm not quite sure what you mean by "affect[ing] the docstring," though.
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 wasn't sure if the doctring can have an inline comment. I just double-checked it can,
BTW - This one may be just easier to fix (make this a comment instead of a docstring) than to suppress and fix later
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.
all of these W0105
were auto-marked by the script I wrote, which is part of the reason why they weren't fixed.
If you want, I can go through and fix them. Is this potentially beyond the scope of this PR, though? Since there are so many changes, I'd prefer to limit the number of changes that aren't just the insertion of a comment.
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.
sure, you can leave them as is.
2.7.pylintrc
Outdated
@@ -100,8 +100,6 @@ disable=bad-option-value, # pylint does not recognize the error code/symbol (nee | |||
useless-object-inheritance, # Used when a class inherit from object, which under python3 is implicit (3+ only) | |||
duplicate-code # Indicates that a set of similar lines has been detected among multiple file. TODO: this is on our "fix" list, and is thus left last. | |||
|
|||
|
|||
# This section controls the duplicate-code error. |
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.
we shouldn't remove this comment
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.
Sorry, this was a mistake with the merging.
.travis.yml
Outdated
@@ -23,25 +23,25 @@ matrix: | |||
- >- | |||
NOSEOPTS="--verbose --with-timer" SETUPOPTS="" | |||
PYLINTOPTS="--rcfile=2.7.pylintrc" | |||
PYLINTFILES="azurelinuxagent/daemon azurelinuxagent/agent.py azurelinuxagent/ga setup.py makepkg.py" | |||
PYLINTFILES="--ignore=osutil,protocol,utils azurelinuxagent/common/ azurelinuxagent/daemon azurelinuxagent/agent.py azurelinuxagent/ga setup.py makepkg.py" |
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.
Why the ignore?
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.
This PR was supposed to be just the loose files in common, not the other folders. Somehow, they made it into the PR, though. I can go ahead and remove the ignore.
Description
2nd of 7 PRs to enable linter.
Error Codes can be found here: http://pylint.pycqa.org/en/latest/technical_reference/features.html
PR information
Quality of Code and Contribution Guidelines