Use PEP 621's [project.requires-python] field to automatically set --target-version
See original GitHub issuePEP 621 provides project.requires-python
field in pyproject.toml. I expect, that most of the tools will support this field eventually.
Each code-related linter and formatter has a setting for supported python version.
Using this field would be good for tool interoperability in the future.
Related: https://github.com/psf/black/issues/751#issuecomment-778441893
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:12 (5 by maintainers)
Top Results From Across the Web
PEP 621 – Storing project metadata in pyproject.toml
Abstract. This PEP specifies how to write a project's core metadata in a pyproject.toml file for packaging-related tools to consume.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I wouldn’t want Black to read other config files than
pyproject.toml
; that’s asking for a lot of additional complexity.I hope to see this feature being added and maybe in a way that it would make it easy to reuse in other tools as updating min-python in so many tools is a PITA and almost a guarantee that you will forget to update one of them.