-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add the ruff linter #424
Add the ruff linter #424
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for introducing ruff to FawltyDeps. The developer's experience will improve a lot (and CI will be happier as well ;) )
I have one question about the ruff settings, namely:
target-version = "py37"
It is not ideal that we have to define lower boundary version in two places (second being):
[tool.poetry.dependencies]
...
python = ">=3.7.2"
I looked into target-version option documentation, and I see that it would have been read by default, but from:
[project]
requires-python = ">=3.8"
Is this a poetry-focused usage of pyproject.toml which disallows that?
Apart from this question, I have no other comments.
All is clear, works well, and is documented 🚀
Exactly. Since we're using Poetry, we're currently defining our project metadata in the Poetry-specific
This is from the PEP621 standard for specifying project metadata, and this standard seems to have more momentum than Poetry's own format, so I'd like to migrate to this at some point. Either we see if Poetry can support the more standard format, or we look around for alternatives to Poetry. But that is a separate issue/effort than this PR. 😄 |
A specific Mypy rule must accompany any 'type: ignore' directive.
For now, run it with `ruff check .` - we will soon replace `pylint` with `ruff` in the `lint` Nox target.
This configures ruff so that the default set of checks pass on the current state of our project. A couple of ignores are needed, along with excluding one file which is in a non-UTF8 charset.
Don't replace pylint just yet...
3e1fba0
to
a6b12cd
Compare
Created #433 to keep discussing our future with/without Poetry |
A minimal introduction of
ruff
. The first in a series of 3 PRs.Commits:
type: ignore
pyproject.toml
: Addruff
as a lint dependencyruff
configurationnoxfile.py
: Addruff check .
tolint
target