-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(python): Use ruff instead of isort, flake8 and pyupgrade.
Use ruff instead of isort, flake8 and pyupgrade. Improve ruff linting support by configuring it properly. A lot of useful flake8 plugins are (partially) implemented in ruff now. isort and pyupgrade reimplementations are also available. Enable the following ruff error codes: - pycodestyle: E, W - Pyflakes: F - flake8-bugbear: B - flake8-comprehensions: C4 - flake8-docstrings: D - isort: I001 - flake8-simplify: SIM - flake8-tidy-imports: TID - flake8-quotes: Q - pyupgrade: UP This allows to quicly check all python code while working on the code base as running black and ruff afterwards, should do almost the same than the current linting (black, isort, pyupgrade, flake8) black ruff . flake8-docstrings general D1 error code is changed to all the current error codes still available in the Polars codebase, ordered from most common, to least common, so it should be easier to make this list of needed error codes to ignore, smaller. D105, D100, D103, D102, D104, D101, For tests it is probably ok that they don't have a docstring, so for those the specific doccstring error codes to ignore are already added for those files so fixing the docstring error codes for non-test python files will be easier down the road: - tests/*/*.py: D100, D103 - tests/docs/run_doc_examples.py: D101, D102, D103 - tests/parametric/__init__.py: D104 - tests/slow/__init__.py: D104
- Loading branch information
Showing
9 changed files
with
81 additions
and
47 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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
black==22.8.0 | ||
blackdoc==0.3.7 | ||
flake8==5.0.4 | ||
flake8-bugbear==22.10.25 | ||
flake8-comprehensions==3.10.0 | ||
flake8-docstrings==1.6.0 | ||
flake8-simplify==0.19.3 | ||
flake8-tidy-imports==4.8.0 | ||
isort==5.10.1 | ||
pyupgrade==3.1.0 | ||
ruff==0.0.208 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# flake8: noqa: W291 | ||
from __future__ import annotations | ||
|
||
import sys | ||
|