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

Use derived target version #896

Merged
merged 2 commits into from Jun 27, 2023
Merged

Use derived target version #896

merged 2 commits into from Jun 27, 2023

Conversation

flying-sheep
Copy link
Contributor

@flying-sheep flying-sheep commented Jun 27, 2023

It’s derived from requires-python in both Ruff:

target-version

[…]
If omitted, and Ruff is configured via a pyproject.toml file, the target version will be inferred from its project.requires-python field (e.g., requires-python = ">=3.8").

and Black (in psf/black#3219):

-t, --target-version

[…] By default, Black will try to infer this from the project metadata in pyproject.toml. […]

Copy link
Sponsor Collaborator

@ofek ofek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know, thanks a lot!

@ofek ofek merged commit 051c1f8 into pypa:master Jun 27, 2023
38 checks passed
@flying-sheep flying-sheep deleted the patch-1 branch June 27, 2023 13:49
@flying-sheep
Copy link
Contributor Author

flying-sheep commented Jun 27, 2023

I recently slimmed down my pyproject.toml and found out!

The fewer lines the better.

prettier derives from .editorconfig. Maybe in the future black and Ruff do that too for their line length and we can fully centralize formatting config.

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.

None yet

2 participants