Skip to content

Commit 8bc3295

Browse files
committed
Add note about being a second-pass macro
1 parent 252077a commit 8bc3295

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

unpythonic/syntax/autoref.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,11 @@ def transform(tree, *, referents, set_ctx, stop, **kw):
189189
# Subscript similarly, a[1][2] --> Subscript(Subscript(a, 1), 2), so Name "a" gets transformed.
190190
return tree
191191

192-
# skip (by name) some common references inserted by other macros
192+
# Skip (by name) some common references inserted by other macros.
193+
#
194+
# We are a second-pass macro (inside out), so any first-pass macro invocations,
195+
# as well as any second-pass macro invocations inside the `with autoref` block,
196+
# have already expanded by the time we run our transformer.
193197
always_skip = ['letter', 'dof', 'namelambda', 'curry', 'currycall', 'lazy', 'lazyrec', 'maybe_force_args',
194198
# test framework stuff
195199
'unpythonic_assert', 'unpythonic_assert_signals', 'unpythonic_assert_raises',

0 commit comments

Comments
 (0)