-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[RFE] warn about unused Pylint disablings #4757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This already exists you need |
Note: double |
Thanks for the correction :) Where would you expect to find it ? Or alternatively I think we could make this one a default message as it permits to really clean code when upgrading pylint. |
In my opinion, as a default checker for relatively new projects it will be useful, but for old ones, this may be cumbersome at the very first time.
though all of the occurrences will be fixed. Probably, I would search for such functionality in |
Squashed commit of the following: commit 49c4bba Author: Yu Shao, Pang <[email protected]> Date: Sun Aug 1 19:56:51 2021 +0800 Fix crash for `unused-private-member` when there are nested attributes commit 2ad8247 Merge: 8ceb26d 1d09bc8 Author: yushao2 <[email protected]> Date: Sun Aug 1 20:13:05 2021 +0800 Merge pull request pylint-dev#4709 from yushao2/fix-unused-private-member-4673 [unused-private-member] add logic for checking nested functions commit 1d09bc8 Author: Yu Shao, Pang <[email protected]> Date: Sun Aug 1 20:03:42 2021 +0800 update pr based on review commit a4198cd Author: Yu Shao, Pang <[email protected]> Date: Sun Aug 1 19:21:36 2021 +0800 Update pr based on review commit c8b2cbb Author: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun Jul 25 05:20:42 2021 +0000 [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci commit 4ffea0b Author: Yu Shao, Pang <[email protected]> Date: Sun Jul 25 13:12:29 2021 +0800 Update pr based on review commit e4d6243 Author: Marc Mueller <[email protected]> Date: Sun Jul 18 17:23:31 2021 +0200 Remove empty line commit cce5833 Author: Yu Shao, Pang <[email protected]> Date: Sun Jul 18 22:40:54 2021 +0800 update PR based on comments commit 712dc2b Author: Yu Shao, Pang <[email protected]> Date: Wed Jul 14 16:42:25 2021 +0800 [unused-private-member] add logic for checking nested functions also, improve error message for nested functions commit 8ceb26d Author: Michal Vasilek <[email protected]> Date: Sun Aug 1 08:14:58 2021 +0200 Fix IsADirectoryError in tests/lint/unittest_lint (pylint-dev#4781) pylintd is a directory, so os.remove throws IsADirectoryError commit a31e6bc Author: Pierre Sassoulas <[email protected]> Date: Sat Jul 31 11:21:46 2021 +0200 Add documentation for useless-suppression Closes pylint-dev#4757 commit b71be8a Author: Mark Byrne <[email protected]> Date: Fri Jul 30 20:21:02 2021 +0200 Handle has-a relationships for type-hinted arguments in class diagrams (pylint-dev#4745) * Pyreverse - Show class has-a relationships inferred from type-hints Closes pylint-dev#4744 Co-authored-by: Pierre Sassoulas <[email protected]> commit 5e5f48d Author: Daniël van Noord <[email protected]> Date: Thu Jul 29 23:44:30 2021 +0200 Add ``forgotten-debug-statement`` checker (pylint-dev#4771) * Add ``no-breakpoint`` checker this adds a checker for calls to ``breakpoint()``, ``pdb.set_trace()``, or ``sys.breakpointhook()``. Closes pylint-dev#3692 Co-authored-by: Marc Mueller <[email protected]> Co-authored-by: Pierre Sassoulas <[email protected]>
Great! Thank you! |
Current problem
The project which actively uses Pylint can contain many disabling of Pylint checkers via the code comments:
http://pylint.pycqa.org/en/latest/user_guide/message-control.html
Desired solution
In my opinion, people disable checkers via the code comments in the next common cases:
I think it will be useful to have an option to check such disabling and report if disabling is no longer needed (only code comments).
Inspired by mypy's:
https://mypy.readthedocs.io/en/stable/command_line.html?highlight=unused-ignores#cmdoption-mypy-warn-unused-ignores
(Additional context)
No response
The text was updated successfully, but these errors were encountered: