Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Features: use ruff instead of pyflakes for linting #21040

Open
uprokevin opened this issue Jun 17, 2023 · 4 comments
Open

New Features: use ruff instead of pyflakes for linting #21040

uprokevin opened this issue Jun 17, 2023 · 4 comments

Comments

@uprokevin
Copy link

Ruff is extremely fast liner, replacement of pyflakes
Try yourself to see the differences:

https://pypi.org/project/ruff/

@dalthviz
Copy link
Member

Hi @pprokevin thank you for the feedback! Maybe this python-lsp-server plugin could be useful for this? https://github.com/python-lsp/python-lsp-ruff

Also, what do you think about this @spyder-ide/core-developers ?

@dalthviz dalthviz self-assigned this Jun 18, 2023
@mrclary
Copy link
Contributor

mrclary commented Jun 18, 2023

I don't know what the trade-offs are, but I like fast better than slow 😄

@CAM-Gerlach
Copy link
Member

Main trade off is just requiring a transitive dependency on compiled Rust code, but given Spyder already depends on a ton of other compiled code with the NumPy/SciPy/Pandas/Matplotlib stack, one more doesn't seem that big of a deal in exchange for greater speed and lots more built in linters (though the speed boost is likely limited by the overhead of PyLSP processing and IPC comms). Integration shouldn't be difficult on the backend side since there's already a PyLSP plugin for it, but we might need to make some Spyder side tweaks (though it is supposed to be mostly high-level compatible with flake8 and its error codes, etc).

@zefr0x
Copy link

zefr0x commented Nov 2, 2024

(though the speed boost is likely limited by the overhead of PyLSP processing and IPC comms)

No longer as issue, since ruff v0.4.5 introduced as an LSP embedded directly in ruff.

Also, they have plans to support general language server features, so PyLSP could be also replaced as will in the future.

https://astral.sh/blog/ruff-v0.4.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants