This commit is contained in:
Nuno Campos 2023-09-28 16:42:58 +01:00
parent 4ba9c16f74
commit 151f27d502

View File

@ -92,6 +92,7 @@ class GetLambdaSource(ast.NodeVisitor):
self.source: Optional[str] = None self.source: Optional[str] = None
def visit_Lambda(self, node: ast.Lambda) -> Any: def visit_Lambda(self, node: ast.Lambda) -> Any:
if hasattr(ast, "unparse"):
self.source = ast.unparse(node) self.source = ast.unparse(node)