I am sure <@U046V0QC124> has an opinion about this...
# random
n
I am sure @Juan Luis has an opinion about this ๐Ÿ”ฅ
๐ŸŒถ๏ธ 1
๐Ÿ”ฅ 1
j
LOL
co-sign
n
Interesting idea, not sure if I like it.
pipx
basically install things like
black
in a global environment (not core dependency), so you installed it once, then have your project dependencies in isolated environment.
j
yep, I'm a big fan of
pipx
! I use it for linters,
docker-compose
, stuff like that
n
I imagine it works well for development, unsure how well does it integrate with things like
pre-commit
that comes with its own virtualenv. May end up running different version of linter in CI and your local?
j
yeah pre-commit does its own thing I think
n
btw people have so many questions about Python Packaging๐Ÿ˜‚
j
you're right, since I started using pre-commit I haven't used pipx much
hahaha of course, it's a hot topic, always ๐Ÿ˜‚
n
canva.live - join the party if you want๐Ÿคฃ Code: 153608
On the other hand, I really want to replace pylint,isort,flake8 with ruff if it covers everything
j
wow! it's amazing, I get the same questions everytime I touch pip or conda during a training ๐Ÿ˜„
On the other hand, I really want to replace pylint,isort,flake8 with ruff if it covers everything
1000 I'm keeping an eye on their issue tracker to see when they release a 0.1.0 version
m
Never used pipx, but I really like ruff! The first time I tried it, I instantly replaced pylint with it and never looked back. Itโ€™s just so unbelievably fast ๐Ÿ˜ฑ. When no issues are found, itโ€™s as if it never ran at all. Plus the
โ€”fix
option is so nice! I run it in VSCode on save and it just frees up so much of my time to focus on logic instead of linting.
ultrafastparrot 1
n
What does the
-fix
option does? pylint is the slowest linter among the rest, it makes my commit takes more than 2 minutes with pre-commit
flake8
doesn't support
pyproject.toml
, another motivation to remove it!
this 1
j
I think
-fix
is essentially the autoformatting part right? isort + black + ...
the creator of Black endorses this effort by the way! https://github.com/charliermarsh/ruff/issues/1904#issuecomment-1470946322
n
image.png
๐Ÿคฃ 2
๐ŸงŒ 1
m
The fix options allows you to fix certain violations against rules. It goes beyond isort and formatting!
๐Ÿ”ฅ 1
n
Stupid question, how do you configure
ruff
that sort imports? @Matthias Roels What's the configuration?
Ah, I figured out I need to do --SELECT=["I"] to include isort rules
๐Ÿ‘ 1