--- a/Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py Tue Mar 07 18:53:18 2017 +0100 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py Tue Mar 07 19:46:57 2017 +0100 @@ -810,7 +810,7 @@ if not nonEmptyLines: return - indent = min([len(l) - len(l.strip()) for l in nonEmptyLines]) + indent = min(len(l) - len(l.strip()) for l in nonEmptyLines) if context.contextType() == "module": expectedIndent = 0 else: @@ -897,8 +897,8 @@ return_ = [tokens[i + 1][0] for i, token in enumerate(tokens) if token[1] == "return"] if (set(return_) - - set([tokenize.COMMENT, tokenize.NL, tokenize.NEWLINE]) != - set([])): + {tokenize.COMMENT, tokenize.NL, tokenize.NEWLINE} != + set()): self.__error(docstringContext.end(), 0, "D134") def __checkNoBlankLineBefore(self, docstringContext, context): @@ -1062,13 +1062,13 @@ if token[1] in ("return", "yield")] if "@return" not in docstringContext.ssource(): if (set(return_) - - set([tokenize.COMMENT, tokenize.NL, tokenize.NEWLINE]) != - set([])): + {tokenize.COMMENT, tokenize.NL, tokenize.NEWLINE} != + set()): self.__error(docstringContext.end(), 0, "D234") else: if (set(return_) - - set([tokenize.COMMENT, tokenize.NL, tokenize.NEWLINE]) == - set([])): + {tokenize.COMMENT, tokenize.NL, tokenize.NEWLINE} == + set()): self.__error(docstringContext.end(), 0, "D235") def __checkEricFunctionArguments(self, docstringContext, context): @@ -1141,13 +1141,13 @@ "@throws" not in docstringContext.ssource() and \ "@raise" not in docstringContext.ssource(): if (set(exception) - - set([tokenize.COMMENT, tokenize.NL, tokenize.NEWLINE]) != - set([])): + {tokenize.COMMENT, tokenize.NL, tokenize.NEWLINE} != + set()): self.__error(docstringContext.end(), 0, "D250") else: if (set(exception) - - set([tokenize.COMMENT, tokenize.NL, tokenize.NEWLINE]) == - set([])): + {tokenize.COMMENT, tokenize.NL, tokenize.NEWLINE} == + set()): self.__error(docstringContext.end(), 0, "D251") def __checkEricBlankAfterSummary(self, docstringContext, context):