Skip to content

Conversation

@santisoler
Copy link
Member

@santisoler santisoler commented Dec 20, 2024

Replace the current linters and auto-formatters we are using in Pooch for ruff.

Note

This branch is intended to collect all changes to complete the replacement of the linters. We should not push to this branch, but open PRs against it instead.

I'm planning to merge this branch as soon as we get ruff happy with Pooch. We can leave a few warnings hanging and ignore them temporarily, so we can tackle them later.

When ready, this branch should be MERGED to main and not Squash and Merged, so we don't create a huge commit.

Important

Make sure that the format passes on CI on PRs targeted to this branch. It's expected that the style check will fail until we solve all warnings, but format should pass.

Remove `flake8`, `pylint` and `black` as requirements to check style and
format the code in `env/requirements-style.txt` and `environment.yml`.
Update targets in `Makefile` to use ruff to check for style and format
the code. Add ruff configs to `pyproject.toml`. Remove the `.pylintrc`
file.
Run `make format` to autoformat Pooch codebase with Ruff.
@leouieda
Copy link
Member

leouieda commented Feb 4, 2025

TODO: Remove the pylint comments to disable rules per file/line.

@santisoler santisoler changed the title Replace pylint, flake8 and black for ruff (#452) Replace pylint, flake8 and black for ruff Oct 8, 2025
As part of the process of replacing `pylint` for Ruff, remove the
comments that were intended to disable `pylint` warnings in code.
Run Ruff's automatic fixes and unsafe fixes to quickly address some of
its complaints.
Fix Ruff's blanket-type-ignore (PGH003) warning by specifying the error
type when ignoring type checker errors.
Add `noqa` comments to ignore Ruff's warnings about unused arguments
where that's the intention.
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.

3 participants