Age | Commit message (Collapse) | Author |
|
With pylint 3 there is a new option: https://pylint.readthedocs.io/en/latest/user_guide/messages/convention/use-implicit-booleaness-not-comparison-to-zero.html
It's disabled by default but we enable all warnings and disabled them as
desired.
This one is of the opinion that:
if x == 0:
is bad and
if x:
is good.
I feel that the first one (x == 0) is more clear. We aren't checking for
truthiness here, we are checking for a literal value, its very
intentional.
One might argue that being precious about making the type here is
redundant in current year with type checking tooling and all that. But
there are like a hundred of these checks in the code base so it seems a
well established pattern anyhow.
In summary, the new warning doesn't have a very strong use case and we
would prefer to stick with out established pattern.
|
|
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.
|
|
|
|
|
|
Only mypy missing now...
|
|
We're deprecating vim modelines in favor of `.editorconfig`.
Removing vim modelines could be done using two one-liners. Most of the vim modelines
were followed by an empty line, so this one-liner took care of these ones:
```sh
rg '^# vim: .+\n\n' -l | xargs sed -i '/^# vim: /,+1d'
```
Then some of the vim modelines were followed by a pylint configuration line, so running
this one-liner afterwards took care of that:
```sh
rg '^# vim:' -l | xargs sed -i '/^# vim: /d'
```
|
|
We're deprecating vim modelines in favor of `.editorconfig`.
|
|
|
|
Not relevant for v3 and qt6
|
|
|
|
See https://pylint.pycqa.org/en/latest/whatsnew/2/2.16/index.html#extensions
|
|
|
|
|
|
TODO: Revert once we use black
|
|
Looks like 2.14 added bad-option-value:
https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/full.html
locally-enabled is long gone:
https://github.com/PyCQA/pylint/issues/2442
and so is bad-continuation:
https://github.com/PyCQA/pylint/pull/3571
no-self-use was moved to an extension in this release:
https://github.com/PyCQA/pylint/pull/6448
|
|
Commits for dropping 3.5 support to copy from:
c245b7d855ccd "Initial drop of Python 3.5"
ccdfb44b8568b "Drop support for Python 3.6.0"
Anything needed to update regarding OS version support in
doc/install.asciidoc?
TODO: remove 3.6/7 annotations in requirements files and
rebuild
workflows: not sure I updated it right (run 5.12 with 3.7, same 18.04 OS) but
18.04 seems to have 3.7 on it too so it should work. It'll all change when we
drop <5.15 anyway. Not sure what the minimum ubuntu version will be going
forward.
Regarding mimetype overrides (ebb3046822adb) the doctring says they can all go
in 3.7 but .h5 is still missing on py39, not sure if we should care.
There are a bunch of old(?) warning messages still ignored in tests/end2end/fixtures/quteprocess.py.
|
|
|
|
|
|
|
|
|
|
|
|
All messages disabled right now, but sounds useful for future updates
|
|
|
|
Now built into pylint
|
|
See #6857
|
|
See #6857
|
|
|
|
See #6857
|
|
See #6197
|
|
Too big code churn right now, will do this for qutebrowser v3.0.0:
See #3020
|
|
|
|
To use ClassVar with dataclass
|
|
|
|
|
|
|
|
For compatibility with black if people want to start using it for new code.
See #4770, #1455
|
|
|
|
This is handled by flake8-debugger
|
|
|
|
|
|
It was moved to a pylint extension because it makes no sense for polyglot
Python 2/3 code, but we're not doing that.
|
|
|
|
|
|
|
|
pylint complains because msgbox.msgbox() can return DummyBox, but we know
that's not the case in tests/unit/misc/test_msgbox.py.
|
|
|
|
There are good reasons to do those.
|
|
|
|
|
|
|