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

Proposal for Code Linting and Formatting with Ruff #2032

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Laurent2916
Copy link
Contributor

Hi there !

From CONTRIBUTING.md:

Code linting and auto-format (black) are not currently in place but open to consideration

I suggest using ruff's code linter (and new formatter), like in other huggingface's projects, such as transformers.
This PR contributes a (somewhat overkill) ruff config in pyproject.toml.

All ruff rules are documented here: https://docs.astral.sh/ruff/rules/
The current config finds 8047 errors, 1982 of them being fixable.

This PR is marked as a draft to initiate discussion and gather feedback before making further modifications to pyproject.toml, CONTRIBUTING.md, pre-commits, or the CI. Your thoughts and suggestions are welcome.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

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

Successfully merging this pull request may close these issues.

None yet

2 participants