--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py Wed Apr 21 17:56:12 2021 +0200 +++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py Wed Apr 21 19:40:50 2021 +0200 @@ -1432,10 +1432,11 @@ # goes past the end of the physical line. This happens in cases like, # foo(bar\n=None) col = min(pos, len(text) - 1) - if text[col].strip(): - newText = text - else: - newText = text[:col].rstrip() + text[col:].lstrip() + newText = ( + text + if text[col].strip() else + text[:col].rstrip() + text[col:].lstrip() + ) # There could be an escaped newline if newText.endswith(('=\\\n', '=\\\r\n', '=\\\r')):