-
Notifications
You must be signed in to change notification settings - Fork 906
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing ruff as a linter to replace pylint, flake8 and isort (#2634)
* first go Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Add isort rules Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * update isort setting Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Add comments for pyproject ruff settings Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * update pre-commit setting Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * remove pylint from pre-commit Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * remove linting library from test requirements Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * fix bash script to skip pylint isort Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Update menitions to pylint, isort and flake8 Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Remove flake8 plugin section in the manifest Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * First draft to update linting docs Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Apply suggestions from code review Co-authored-by: Merel Theisen <49397448+merelcht@users.noreply.github.com> * Fix subprocess.pipe with ruff recommendation Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Fix test asserting stdout,stderr to use capture_output=True Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * fix more docs Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Add pylint rule sets and replace pylint disable with noqa Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Fix according to ruff, merge isinstance check PLR1701 Merge these isinstance calls: `isinstance(app.builder, (CheckExternalLinksBuilder, LaTeXBuilder))` Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * fix test according to lint: tests/framework/session/test_session.py:588:38: PLC1901 `exception["value"] == ""` can be simplified to `not exception["value"]` as an empty string is falsey Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * fix dataset linting Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * fix config linting Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * temporary commit for merge Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * remove unused command in makefile Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Fix linting for runner Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * fix micropkg lint Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Fix PLW2901 # noqa: redefined-loop-name Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * PLR0913 - Too many arguments to function call Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * PLR2004 - magic value Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * linting Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * kedro/framework/context/context.py:151:13: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * fix lint Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * fix doc links Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Update config to show-fix for debugging Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Fix ruff args Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Update ruff version Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Update ruff versions Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Suppress sort import error for linting Signed-off-by: Nok <nok.lam.chan@quantumblack.com> --------- Signed-off-by: Nok <nok.lam.chan@quantumblack.com> Co-authored-by: Merel Theisen <49397448+merelcht@users.noreply.github.com>
- Loading branch information
Showing
92 changed files
with
322 additions
and
377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.