src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Annotations/AnnotationsChecker.py

branch
server
changeset 10761
63618ecdbe57
parent 10760
f702f6781b05
child 11090
f5f5f5803935
equal deleted inserted replaced
10759:aeb98b3fa008 10761:63618ecdbe57
202 from .AnnotationsFunctionVisitor import FunctionVisitor 202 from .AnnotationsFunctionVisitor import FunctionVisitor
203 203
204 # Type ignores are provided by ast at the module level & we'll need them later 204 # Type ignores are provided by ast at the module level & we'll need them later
205 # when deciding whether or not to emit errors for a given function 205 # when deciding whether or not to emit errors for a given function
206 typeIgnoreLineno = {ti.lineno for ti in self.__tree.type_ignores} 206 typeIgnoreLineno = {ti.lineno for ti in self.__tree.type_ignores}
207 hasMypyIgnoreErrors = ( 207 hasMypyIgnoreErrors = any(
208 any("# mypy: ignore-errors" in line for line in self.__source[:5]) 208 "# mypy: ignore-errors" in line for line in self.__source[:5]
209 ) 209 )
210 210
211 suppressNoneReturning = self.__args.get( 211 suppressNoneReturning = self.__args.get(
212 "SuppressNoneReturning", 212 "SuppressNoneReturning",
213 AnnotationsCheckerDefaultArgs["SuppressNoneReturning"], 213 AnnotationsCheckerDefaultArgs["SuppressNoneReturning"],

eric ide

mercurial