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

RF002: You have both Ruff's target-version and project.requires-python. You only need the later. #407

Closed
DimitriPapadopoulos opened this issue Apr 9, 2024 · 1 comment · Fixed by #409

Comments

@DimitriPapadopoulos
Copy link
Contributor

DimitriPapadopoulos commented Apr 9, 2024

No, the lat(t)er is (currently) not (always) enough!

If the repo contains a ruff.toml or .ruff.toml file, ruff will not read pyproject.toml. So even though requires-python may be set in pyproject.toml, you still need to set target-version in ruff.toml or .ruff.toml.

Perhaps that's a ruff bug, but it's still under discussion in an open issue: astral-sh/ruff#10299

I noticed this in sphinx-doc/sphinx#12250

@henryiii
Copy link
Collaborator

henryiii commented Apr 9, 2024

Ahh, interesting. I don't usually use those unless I don't have a pyproject.toml. The check should be fixed (unless/until it's fixed).

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 a pull request may close this issue.

2 participants