Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Feb 21, 2019

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.

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 tqchen merged commit e20ef0d into apache:master Feb 21, 2019
@tqchen
Copy link
Member

tqchen commented Feb 21, 2019

Thanks @mjs-arm , this is now merged

@ghost ghost deleted the fix-pylint-gripes branch February 22, 2019 10:33
@yzhliu yzhliu mentioned this pull request Mar 2, 2019
28 tasks
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants