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"], |