URL:
https://github.com/freeipa/freeipa/pull/3737
Author: frasertweedale
Title: #3737: [Backport][ipa-4-6] Fixed errors newly exposed by pylint 2.4.0
Action: opened
PR body:
"""
Manual backport of
https://github.com/freeipa/freeipa/pull/3727.
Newest Pylint introduced additional checks [1]:
- import-outside-toplevel [2]
This check warns when modules are imported from places other
than a module toplevel, e.g. inside a function or a class.
- no-else-continue [3]
These checks highlight unnecessary else and elif blocks after
break and continue statements.
- unnecessary-comprehension [4]
This check is emitted when pylint finds list-, set- or
dict-comprehensions, that are unnecessary and can be rewritten
with the list-, set- or dict-constructors.
[1]
https://github.com/PyCQA/pylint/blob/pylint-2.4.0/doc/whatsnew/2.4.rst
[2]
https://github.com/PyCQA/pylint/issues/3067
[3]
https://github.com/PyCQA/pylint/issues/2327
[4]
https://github.com/PyCQA/pylint/issues/2905
Fixes:
https://pagure.io/freeipa/issue/8077
"""
To pull the PR as Git branch:
git remote add ghfreeipa
https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/3737/head:pr3737
git checkout pr3737