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

style: migrate to ruff #1564

Open
SauravMaheshkar opened this issue Jun 25, 2024 · 9 comments
Open

style: migrate to ruff #1564

SauravMaheshkar opened this issue Jun 25, 2024 · 9 comments

Comments

@SauravMaheshkar
Copy link
Collaborator

SauravMaheshkar commented Jun 25, 2024

astral-sh/ruff has emerged as a competitor to the existing linters. It's considerably faster than the current linter pylint viz.

Source: ruff repository

Switching to ruff would enable us to switch to a single tool, as it has drop-in parity with black, isort and support for pylint rules.

Happy to open a PR if interested 😄

References:

@philippmwirth
Copy link
Contributor

Great idea, we already use ruff internally. We'd welcome a PR.

@TakshPanchal
Copy link

I would like to contribute.

@SauravMaheshkar
Copy link
Collaborator Author

@TakshPanchal sounds good, LMK if you need any help with the PR

@TakshPanchal
Copy link

Currently, isort and black is being used right? So I have to pylintrc as reference config. From docs,

Ruff can be configured through a pyproject.toml, ruff.toml, or .ruff.toml file.

So majorly I have to convert pylintrc with one of these file right?

@SauravMaheshkar
Copy link
Collaborator Author

Currently, isort and black is being used right? So I have to pylintrc as reference config. From docs,

Ruff can be configured through a pyproject.toml, ruff.toml, or .ruff.toml file.

So majorly I have to convert pylintrc with one of these file right?

Yes, and let's stick with one single configuration file, so convert pylintrc to a ruff configuration within pyproject.toml.

Ideally the changes lead to no style changes, i.e. running make lint with ruff leads to no changes in code files.

@Abhrajitdas02
Copy link

can I work on this issue?

@SauravMaheshkar
Copy link
Collaborator Author

Sure, we only assign one issue at a time. So, I'll assign this issue for now. If you want to work on some other issue first, let me know.

@SauravMaheshkar
Copy link
Collaborator Author

@Abhrajitdas02 would you like any help with this issue?

@SauravMaheshkar
Copy link
Collaborator Author

@guarin I was working on this and noticed that we actually don't enforce pylint anywhere.

Source: https://github.com/search?q=repo%3Alightly-ai%2Flightly%20pylint&type=code

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