I want to detect (and potentially correct) the following pattern:

# Bad
if condition1:
    if condition2:

# Should be transformed to:
if condition1 and condition2:

Is there a flake8 plugin which can detect that or an "autoformatter" which can do the transformation automatically? (e.g. a pre-commit hook)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.