Python: Replace isort, pylint, prettier, pyupgrade & flake8 with ruff#8408
Python: Replace isort, pylint, prettier, pyupgrade & flake8 with ruff#8408Fokko merged 26 commits intoapache:masterfrom
isort, pylint, prettier, pyupgrade & flake8 with ruff#8408Conversation
…ing of python projects
|
Linked to issue: #8294 |
Co-authored-by: Fokko Driesprong <[email protected]>
|
I saw flake8 also being used we can remove that as well, as Ruff can take care of flake rules by default |
… were exlcuded in flake in ruff aswell
isort, pylint, prettier & flake8 with ruff
isort, pylint, prettier & flake8 with ruffisort, pylint, prettier & flake8 with ruff
|
@MehulBatra I think we can also remove pyupgrade: |
Fokko
left a comment
There was a problem hiding this comment.
Some small comments, can you take a look at those @MehulBatra? Apart from that, it looks great! There are probably more rules that we want to enable, but we can do that in a follow up PR. I like ruff a lot.
Co-authored-by: Fokko Driesprong <[email protected]>
isort, pylint, prettier & flake8 with ruffisort, pylint, prettier, pyupgrade & flake8 with ruff
Fokko
left a comment
There was a problem hiding this comment.
Something looks really off 🤔
666f891 to
3afd3ed
Compare
Fokko
left a comment
There was a problem hiding this comment.
Some small nits, but apart from that it looks great! Almost there
python/build-module.py
Outdated
|
|
||
| import os | ||
| import shutil | ||
|
|
There was a problem hiding this comment.
This line surprises me since they are both internal packages.
There was a problem hiding this comment.
It separated import and from statements mostly due to property
lines-between-types = 1
There was a problem hiding this comment.
Co-authored-by: Fokko Driesprong <[email protected]>
python/build-module.py
Outdated
|
|
||
| import os | ||
| import shutil | ||
|
|
There was a problem hiding this comment.
It separated import and from statements mostly due to property
lines-between-types = 1
python/tests/avro/test_decoder.py
Outdated
| import pytest | ||
|
|
||
| from pyiceberg.avro.decoder import BinaryDecoder, StreamingBinaryDecoder, new_decoder | ||
| from pyiceberg.avro.decoder import BinaryDecoder, StreamingBinaryDecoder, new_decoder # type: ignore |
There was a problem hiding this comment.
It was throwing Module "pyiceberg.avro.decoder" has no attribute "new_decoder" while running mypy check in commit hook hence added
# type: ignore comment to tell mypy to ignore this error
|
python/pyiceberg/io/pyarrow.py:1164:16: E721 Do not compare types, use |
|
for ruff isort properties added properties in toml: |
This is a great catch already, thanks for fixing this! |
|
fixed the mypy_path config |
|
Thanks again @MehulBatra for working on this, great to have this in! |
|
Nice one :) |

We will be using Rust for faster CICD
It's written in rust for faster linting , sorting & typechecking it will be used as a part of the pre-commit hook & git runner replacing Isort, pylint, prettier, pyupgrade and flake8 and will help in the faster development cycle by pointing errors, bugs, stylistic errors, and suspicious constructs faster than ever.
Resolves #8294