-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix pylint 2.2.2 gripes. #2642
Merged
Merged
Fix pylint 2.2.2 gripes. #2642
Conversation
This file contains 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
pylint 2.2 introduced support for duplicate-string-formatting-argument. This patch adjusts the code to adopt the suggestion.
…parisons. pylint 2.0 introduced support for consider-using-in. This patch adjusts the code to adopt the suggestion.
pylint 2.0 introduced support for chained-comparison. This patch adjusts the code to adopt the suggestion.
pylint 2.0 introduced support for consider-using-set-comprehension. This patch adjusts the code to adopt the suggestion.
Recent pylint introduced no-else-return diagnostics. This patch adjusts the code to deal with the all of the elif after return instances.
Recent pylint introduced no-else-return diagnostics. This patch adjusts the code to deal with the all of the else after return instances.
Recent pylint introduced support for the useless-return diagnostic. This patch remove the useless returns.
The offending function contains a raise for "not yet supported" but pylint views the subsequent use of this function as an attempt to use the value returned from a function returning None. This patch temporarily disables the pylint error by adding a dummy return then disabling the warning on the unreachable return. This issue could be fixed with a pylint disable markup on each call site, but this solution in the "not yet implemented" function seems more appropriate because there is removes the possibility that dangling pylint markup is left behind at call site when the function is eventually implemented.
tqchen
approved these changes
Feb 21, 2019
Thanks @mjs-arm , this is now merged |
ghost
deleted the
fix-pylint-gripes
branch
February 22, 2019 10:33
wweic
pushed a commit
to neo-ai/tvm
that referenced
this pull request
Mar 9, 2019
wweic
pushed a commit
to neo-ai/tvm
that referenced
this pull request
Mar 12, 2019
wweic
pushed a commit
to neo-ai/tvm
that referenced
this pull request
Mar 12, 2019
tqchen
pushed a commit
to tqchen/tvm
that referenced
this pull request
Mar 29, 2020
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.
The current code base is clean w.r.t pylint 1.9.5 but more recent version of pylint generate a large number of diagnostics. This series of patches addresses the bulk of the diagnostics (against pylint 2.2.2.). After this series of patches there are a small number of slightly more awkward diagnostics left, I'll deal with them in due course.