find_ast_node faststream.utils.ast.find_ast_node # find_ast_node( module: Module, lineno: Optional[int] ) -> Optional[AST] Source code in faststream/utils/ast.py 27 28 29 30 31 32 33 34 35 36 37def find_ast_node(module: ast.Module, lineno: Optional[int]) -> Optional[ast.AST]: if lineno is not None: # pragma: no branch for i in getattr(module, "body", ()): if i.lineno == lineno: return cast(ast.AST, i) r = find_ast_node(i, lineno) if r is not None: return r return None