diff options
author | Brad Warren <bmw@users.noreply.github.com> | 2021-05-24 20:02:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-24 20:02:55 +0300 |
commit | 315ddb247f3dcf29eaa0bd357e3e88c9e6465eac (patch) | |
tree | 7097fecc23e6f479ffce86ea15e2239219670b7b /.pylintrc | |
parent | 2df279bc5bb30a38e4f9c1c5e44a7b327c56743c (diff) |
Upgrade pylint (#8855)
This is part of https://github.com/certbot/certbot/issues/8782. I took it on now because the currently pinned version of `pylint` doesn't work with newer versions of `poetry` which I wanted to upgrade as part of https://github.com/certbot/certbot/issues/8787.
To say a bit more about the specific changes in this PR:
* Newer versions of `pylint` complain if `Popen` isn't used as a context manager. Instead of making this change, I switched to using `subprocess.run` which is simpler and [recommended in the Python docs](https://docs.python.org/3/library/subprocess.html#using-the-subprocess-module). I also disabled this check in a few places where no longer using `Popen` would require significant refactoring.
* The deleted code in `certbot/certbot/_internal/renewal.py` is cruft since https://github.com/certbot/certbot/pull/8685.
* The unused argument to `enable_mod` in the Apache plugin is used in some over the override classes that subclass that class.
* unpin pylint and repin dependencies
* disable raise-missing-from
* disable wrong-input-order
* remove unused code
* misc lint fixes
* remove unused import
* various lint fixes
Diffstat (limited to '.pylintrc')
-rw-r--r-- | .pylintrc | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -56,7 +56,18 @@ extension-pkg-whitelist=pywintypes,win32api,win32file,win32security # See https://github.com/PyCQA/pylint/issues/1498. # 3) Same as point 2 for no-value-for-parameter. # See https://github.com/PyCQA/pylint/issues/2820. -disable=fixme,locally-disabled,locally-enabled,bad-continuation,no-self-use,invalid-name,cyclic-import,duplicate-code,design,import-outside-toplevel,useless-object-inheritance,unsubscriptable-object,no-value-for-parameter,no-else-return,no-else-raise,no-else-break,no-else-continue +# 4) raise-missing-from makes it an error to raise an exception from except +# block without using explicit exception chaining. While explicit exception +# chaining results in a slightly more informative traceback, I don't think +# it's beneficial enough for us to change all of our current instances and +# give Certbot developers errors about this when they're working on new code +# in the future. You can read more about exception chaining and this pylint +# check at +# https://blog.ram.rachum.com/post/621791438475296768/improving-python-exception-chaining-with. +# 5) wrong-import-order generates false positives and a pylint developer +# suggests that people using isort should disable this check at +# https://github.com/PyCQA/pylint/issues/3817#issuecomment-687892090. +disable=fixme,locally-disabled,locally-enabled,bad-continuation,no-self-use,invalid-name,cyclic-import,duplicate-code,design,import-outside-toplevel,useless-object-inheritance,unsubscriptable-object,no-value-for-parameter,no-else-return,no-else-raise,no-else-break,no-else-continue,raise-missing-from,wrong-import-order [REPORTS] |