Add linting back to CI - Ruff #4270
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview: What does this pull request change?
Add Ruff Linting back to CI (related to the issue #3622)
In detail:
lint-ruff.yml
workflow to run on each push and pull requests to the branch main.pyproject.toml
like: PLR2004 to ignore some specifics errors related to literal values like numbers and strings used directly inside the code. PLR0913 to ignore too many arguments from the functions. (If need to include more ignores, please let me know).ruff check .
Motivation and Explanation: Why and how do your changes improve the library?
With the return of linting now with ruff (instead of pylint) in CI, we will have more coverage of errors related to the manim source code, thus making it possible to maintain when necessary. Ruff offers significantly faster linting performance, broader rule support, and a cleaner configuration experience via
pyproject.toml
. This change improves both developer efficiency and maintainability of the codebase. Therefore, adding linting with ruff back to CI can contribute to the robustness of the library.Links to added or changed documentation pages
There are no changes yet to documentation pages (if needed, please let me know).
Further Information and Comments
Not counting the auto-fixes already changed by ruff, 86 more errors were found:
Found 86 errors. No fixes available (5 hidden fixes can be enabled with the --unsafe-fixes option).
From my perspective these errors do not seriously affect the code yet, but it is worth investigating these small errors further in the future. I will check better these small errors and if I open an issue, I´ll let you know.
Reviewer Checklist