--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py Thu Jun 25 19:09:55 2020 +0200 +++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py Sat Jun 27 12:08:12 2020 +0200 @@ -7,16 +7,10 @@ Module implementing a class to fix certain code style issues. """ -from __future__ import unicode_literals -try: - # Python 2 - from StringIO import StringIO # __IGNORE_EXCEPTION__ -except ImportError: - # Python 3 - from io import StringIO # __IGNORE_WARNING__ import os import re import tokenize +from io import StringIO # CodeStyleCheckerDialog tries to import FixableCodeStyleIssues which fails # under Python3. So ignore it. @@ -26,8 +20,8 @@ pass FixableCodeStyleIssues = [ - "D111", "D112", "D113", "D121", "D131", "D141", - "D142", "D143", "D144", "D145", + "D111", "D112", "D121", "D131", "D141", "D142", + "D143", "D144", "D145", "D221", "D222", "D231", "D242", "D243", "D244", "D245", "D246", "D247", "E101", "E111", "E121", "E122", "E123", "E124", @@ -108,7 +102,6 @@ self.__fixes = { "D111": self.__fixD111, "D112": self.__fixD112, - "D113": self.__fixD112, "D121": self.__fixD121, "D131": self.__fixD131, "D141": self.__fixD141, @@ -557,9 +550,9 @@ def __fixD112(self, code, line, pos): """ - Private method to fix docstring 'r' or 'u' in leading quotes. + Private method to fix docstring 'r' in leading quotes. - Codes: D112, D113 + Codes: D112 @param code code of the issue @type str @@ -575,8 +568,6 @@ line = line - 1 if code == "D112": insertChar = "r" - elif code == "D113": - insertChar = "u" else: return (0, "", 0)