--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py Sun Nov 06 11:22:39 2022 +0100 +++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py Mon Nov 07 17:19:58 2022 +0100 @@ -7,9 +7,11 @@ Module implementing a class to fix certain code style issues. """ +import codecs import contextlib import os import re +import textwrap import tokenize from io import StringIO @@ -269,8 +271,6 @@ @param encoding encoding of the source file (string) @return error message on failure (tuple of str) """ - import codecs - if not self.__modified: # no need to write return None @@ -2742,8 +2742,6 @@ # Trim comments that end with things like --------- return newText[:maxLength] + self.__eol elif isLast and re.match(r"\s*#+\s*\w+", newText): - import textwrap - splitLines = textwrap.wrap( newText.lstrip(" \t#"), initial_indent=indentation,