Fix pylint problems
See original GitHub issueThe goal of this issue is to enable some pylint rules that we disabled while doing the Python 3 migration.
Steps to follow to create a PR:
- Ask @vojtechjelinek to assign you to one of the items below
- Remove the assigned item from the .pylintrc
- Run
python -m scripts.linters.pre_commit_linter --only-check-file-extensions=py --path=core --verbose
to check existing issues in the codebase. (This can take 3-5 mins mins to complete.) - If the above script takes too much time or you have a slow machine then consider pushing the code to GitHub and GitHub actions will run these checks for you.
- Fix all the issues found by running the above command.
- Commit all the changes and create a PR.
Example PRs: #14474
Remove some disables from the .pylintrc:
-
cyclic-import
@PietroFracCab -
consider-using-with
@richard-johansson
Refactor custom validators that are not working correctly:
- #16366 (assignments tracked in linked issue)
Decided not to introduce:
-
consider-using-dict-items
@mjsumpter -
consider-using-f-string
-
super-with-arguments
@jrvald -
unnecessary-pass
-
arguments-renamed
-
import-outside-toplevel
Issue Analytics
- State:
- Created 2 years ago
- Comments:108 (57 by maintainers)
Top Results From Across the Web
How do I automatically fix lint issues reported by pylint?
Some of the formatting-errors reported by pylint can be fixed with autopep8, black, or the built-in formatting supported by PyCharm and ...
Read more >Auto-fixing annoyances with Black and Pylint - Medium
This post introduces the tools Pylint and Black for automatically resolving Python code-style problems. If you're new to Python, ...
Read more >Pylint Errors | Improve Your Code with Pylint and Black
Working Through Pylint Errors · Error: inconsistent use of tabs and spaces · Errors: line too long , trailing whitespace , wrong import...
Read more >Linting Python in Visual Studio Code
Linting highlights syntactical and stylistic problems in your Python source code, which often helps you identify and correct subtle programming errors or ...
Read more >Python Linter—Write Clean Python Code (Examples)
Flake8 works such that it analyzes your code and displays all the issues. Then it is up to you to actually fix the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@richard-johansson Done.
@prakhar1144 Are you working on this?
@richard-johansson I think you can work on
consider-using-with
if @prakhar1144 doesn’t reply.