-
Notifications
You must be signed in to change notification settings - Fork 289
Open
Description
New issue after #86
To make it short: Even though it is done only in aggressive mode 2 it is wrong.
if var == True has the semantic of if var is True. E.g. [1] == True evaluates to False. So this "fix" changes semantic.
I deeply believe this should not be done. Even though it might be unintentional there are cases where an == True or better is True are wanted. Changing the semantic isn't something an autoformatter/autofixer should do.
Rationale: Core description is "autopep8 automatically formats Python code to conform to the PEP 8 style guide.". It is NOT up to the tool to "fix" possible coding errors only to make sure it is PEP8 correct
adam-ah, ktvoelker and StefanoPietrosanti
Metadata
Metadata
Assignees
Labels
No labels