Rule(s): SIM300 (However it likely affects more rules)
Adjustment: Use repr when printing the strings
Explanation
With an if statement like this:
if "}\n" == line:
...
the current version of flake8-simplify prints the }\n string with an actual new line, instead of escaping the special newline character, like doing repr("}\n") would. This looks very weird, and many editors don't support it and only print the first line, which is misleading:
Desired change
Explanation
With an if statement like this:
the current version of flake8-simplify prints the
}\n
string with an actual new line, instead of escaping the special newline character, like doingrepr("}\n")
would. This looks very weird, and many editors don't support it and only print the first line, which is misleading: