--fix-only
, but for just a specific rule
#10106
Unanswered
jamesbraza
asked this question in
Q&A
Replies: 1 comment
-
A way to work around this is to define a custom extend = "pyproject.toml"
# This special configuration is meant to *only* autofix typing issues.
fix-only = true
[lint]
extend-safe-fixes = ["ANN201"]
select = ["ANN201"] Then, invoking |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I like ANN201's autofix because it adds
-> None
to functions where possible. However, in general, I don't like enforcing a requirement to specify return types.From my
pyproject.toml
config file:This enables the autofixes for ANN201, but also makes it a requirement to always pass.
In general, I am looking for something like
--fix-only
, but instead of being global, it is scoped to specific rules. Is there some way to have--fix-only
for specific rule codes?Beta Was this translation helpful? Give feedback.
All reactions