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

branch
eric7
changeset 10760
f702f6781b05
parent 10754
6faecb62f3a4
child 11090
f5f5f5803935
equal deleted inserted replaced
10758:1fd5ea95c0e3 10760:f702f6781b05
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