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 --target-version pyXX
option to CLI
#2857
Comments
Hey thanks for filing! This exact API actually is available on the CLI, I just hid it by accident in a prior commit 🤦 |
Oh wow that's perfect! And incredibly fast! I can test #2859 as soon as a release is publish. |
It should actually work even with existing versions ( |
Works indeed!
No rush then to publish a new version of ruff. Feel free to close this issue! :) And thanks a lot for ruff, I played with it today and was able to get rid of |
Amazing, thanks for giving Ruff a try :) |
Just FYI, it doesn't supports multiple value yet, but that's a detail:
|
This is a feature request to add a
--target-version pyXX
to ruff.The idea is to mimick Black by allowing any subset of the following values:
--target-version py37
--target-version py38
--target-version py39
--target-version py310
--target-version py311
With the idea that you should include all Python versions that you want your code to run under (as Black does).
This exact format is also what
blacken-docs
CLI supports.On a practical level, this will help me a lot as I already generates these flags in my build pipeline for Black and blacken-docs. These are generated dynamically by inspecting the
pyproject.toml
of my projects.The text was updated successfully, but these errors were encountered: