summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoofar <toofar@spalge.com>2023-10-11 19:10:45 +1300
committertoofar <toofar@spalge.com>2023-10-11 19:16:01 +1300
commit750e2b0a72e39c1e915b63d8fca245e0094ef4d6 (patch)
tree5884c013aca4762bb930d69cc0968e0656bf4f56
parent2c503bf35d5f465e5adf2838ee7b1b9d1775e1e1 (diff)
downloadqutebrowser-750e2b0a72e39c1e915b63d8fca245e0094ef4d6.tar.gz
qutebrowser-750e2b0a72e39c1e915b63d8fca245e0094ef4d6.zip
pylint 3.0 deprectations
Changelog: https://pylint.pycqa.org/en/latest/whatsnew/3/3.0/index.html#summary-release-highlights remove `__implements__`: That attribute is apparently from a rejected PEP. They say to inherit from BaseChecker, which we are already doing. https://github.com/pylint-dev/pylint/pull/8404 check_messages -> only_required_for_messages: Seems straightforward instructions. I haven't actually tested it. https://github.com/pylint-dev/pylint/pull/8409 remove emptystring extension: Looks like this has been replaced by https://pylint.readthedocs.io/en/stable/user_guide/messages/convention/use-implicit-booleaness-not-comparison-to-string.html Which is disabled by default but we have `enable=ALL`, so I guess that means we indeed have it enabled. And update changelog URLs.
-rw-r--r--.pylintrc1
-rw-r--r--scripts/dev/changelog_urls.json4
-rw-r--r--scripts/dev/pylint_checkers/qute_pylint/config.py3
3 files changed, 2 insertions, 6 deletions
diff --git a/.pylintrc b/.pylintrc
index a02732c2d..46a8ae2e8 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -3,7 +3,6 @@ ignore=resources.py
extension-pkg-whitelist=PyQt5,PyQt6,sip
load-plugins=qute_pylint.config,
pylint.extensions.docstyle,
- pylint.extensions.emptystring,
pylint.extensions.overlapping_exceptions,
pylint.extensions.code_style,
pylint.extensions.comparison_placement,
diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json
index 5a9c9b34a..1870d0228 100644
--- a/scripts/dev/changelog_urls.json
+++ b/scripts/dev/changelog_urls.json
@@ -1,9 +1,8 @@
{
- "pylint": "https://pylint.pycqa.org/en/latest/whatsnew/2/index.html",
+ "pylint": "https://pylint.pycqa.org/en/latest/whatsnew/3/index.html",
"tomlkit": "https://github.com/sdispater/tomlkit/blob/master/CHANGELOG.md",
"dill": "https://github.com/uqfoundation/dill/commits/master",
"isort": "https://github.com/PyCQA/isort/blob/main/CHANGELOG.md",
- "lazy-object-proxy": "https://github.com/ionelmc/python-lazy-object-proxy/blob/master/CHANGELOG.rst",
"mccabe": "https://github.com/PyCQA/mccabe#changes",
"pytest-cov": "https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst",
"pytest-xdist": "https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst",
@@ -93,7 +92,6 @@
"altgraph": "https://github.com/ronaldoussoren/altgraph/blob/master/doc/changelog.rst",
"urllib3": "https://github.com/urllib3/urllib3/blob/main/CHANGES.rst",
"lxml": "https://github.com/lxml/lxml/blob/master/CHANGES.txt",
- "wrapt": "https://github.com/GrahamDumpleton/wrapt/blob/develop/docs/changes.rst",
"cryptography": "https://cryptography.io/en/latest/changelog.html",
"toml": "https://github.com/uiri/toml/releases",
"tomli": "https://github.com/hukkin/tomli/blob/master/CHANGELOG.md",
diff --git a/scripts/dev/pylint_checkers/qute_pylint/config.py b/scripts/dev/pylint_checkers/qute_pylint/config.py
index 283de5d35..be5bae082 100644
--- a/scripts/dev/pylint_checkers/qute_pylint/config.py
+++ b/scripts/dev/pylint_checkers/qute_pylint/config.py
@@ -21,7 +21,6 @@ class ConfigChecker(checkers.BaseChecker):
"""Custom astroid checker for config calls."""
- __implements__ = interfaces.IAstroidChecker
name = 'config'
msgs = {
'E9998': ('%s is no valid config option.', # flake8: disable=S001
@@ -31,7 +30,7 @@ class ConfigChecker(checkers.BaseChecker):
priority = -1
printed_warning = False
- @utils.check_messages('bad-config-option')
+ @utils.only_required_for_messages('bad-config-option')
def visit_attribute(self, node):
"""Visit a getattr node."""
# We're only interested in the end of a config.val.foo.bar chain