Skip to content

Commit df4925e

Browse files
committed
Ignore the str field of ast.Interpolation
This seems like a mis-feature - we can already get the source text if we want it. It shouldn't be part of the AST node.
1 parent 9b98967 commit df4925e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/python_minifier/ast_compare.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ def counter():
6363

6464
if field == 'kind' and isinstance(l_ast, ast.Constant):
6565
continue
66+
67+
if field == 'str' and hasattr(ast, 'Interpolation') and isinstance(l_ast, ast.Interpolation):
68+
continue
6669

6770
if isinstance(getattr(l_ast, field, None), list):
6871

0 commit comments

Comments
 (0)