Conversation
Finds cases like
textwrap.dedent("""
x \
y
""")
which can't be safely reindented without changing their final value.
|
I'm not sure what's going on, but when I try to apply this to coverage, it says NEEDS_WORK, but --patch doesn't show a patch and --apply makes no changes: |
|
That's expected, it prints a message and exits 99 on affected files. I couldn't figure out an autofix I was happy with -- getting rid of the continuation but keeping the same (weird) value didn't seem good, and doubling the backslash to do what the user probably intended isn't really better because it will probably break behavior you were relying on. |
|
Maybe we should have ick print a message then: "No fix available" |
|
NEEDS_WORK is supposed to include both "no autofix" and "incomplete autofix" -- as an example, we might have one batch exit 0 and one batch exit 99 -- "human, take a look" is what you need to do because it's not fully automatic. Fingers crossed this is just a wordsmithing problem? We could potentially add another status that's just "unsafe fix" if that's more user-friendly to retry with another flag. |
|
Maybe instead of status codes we should piggyback on structured metadata. It would definitely help to clearly indicate that the rules wants a change but cannot make the change. |
Finds cases like
which can't be safely reindented without changing their final value.