Skip to content

Conversation

@DimitriPapadopoulos
Copy link
Contributor

Subject: Avoid redundant target-version

Feature or Bugfix

  • Refactoring

Purpose

  • Do not specify the minimal Python version with target-version. Instead, let ruff read requires-python in pyproject.toml.

Do not specify the minimal Python version with `target-version`. Instead,
let ruff read  `requires-python` in `pyproject.toml`.
@DimitriPapadopoulos DimitriPapadopoulos changed the title Avoid redudant target-version Avoid redundant target-version Apr 9, 2024
@DimitriPapadopoulos
Copy link
Contributor Author

Just noticed it is flagged by repo-review:
https://learn.scientific-python.org/development/guides/repo-review/?repo=sphinx-doc%2Fsphinx&branch=master

RF002: Target version must be set

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

@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented Apr 9, 2024

Unfortunately, there's a gap between theory and practice: I presume ruff may not read requires-python = ">=3.9" from pyproject.toml if there's a .ruff.toml file. I'll investigate and create an issue against ruff.

@DimitriPapadopoulos
Copy link
Contributor Author

astral-sh/ruff#10299 already raised this ruff issue.

@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as draft April 9, 2024 19:52
@AA-Turner AA-Turner closed this Apr 24, 2024
@DimitriPapadopoulos DimitriPapadopoulos deleted the no_target-version branch April 25, 2024 10:03
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants