Skip to content

Commit d053f3f

Browse files
Technologicatclaude
andcommitted
Mark the per-testset inner redefinitions in the multishot tests as intended
Each `myield_from` testset defines its own `inner` in the shared scope of `runtests`, and pyflakes reports the rebinding as F811, since the only use of each is inside `outer`'s body. Every one is used within its own testset before the next is defined. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent e91af4f commit d053f3f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

unpythonic/syntax/tests/test_multishot.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def outer():
257257
with testset("myield_from: assignment form binds inner's StopIteration value"):
258258
with continuations:
259259
@multishot
260-
def inner():
260+
def inner(): # noqa: F811 -- each testset defines its own, and uses it before the next one does
261261
myield[1]
262262
return 99
263263

@@ -272,7 +272,7 @@ def outer():
272272
with testset("myield_from: gi_yieldfrom tracks the inner iterator while delegating"):
273273
with continuations:
274274
@multishot
275-
def inner():
275+
def inner(): # noqa: F811 -- each testset defines its own, and uses it before the next one does
276276
myield[1]
277277
myield[2]
278278

@@ -303,7 +303,7 @@ def outer():
303303
with testset("myield_from: send forwards value into inner"):
304304
with continuations:
305305
@multishot
306-
def inner():
306+
def inner(): # noqa: F811 -- each testset defines its own, and uses it before the next one does
307307
v = myield[10]
308308
myield[v] # echo the sent value
309309

@@ -318,7 +318,7 @@ def outer():
318318
with testset("myield_from: throw forwards exception into inner; uncaught propagates out"):
319319
with continuations:
320320
@multishot
321-
def inner():
321+
def inner(): # noqa: F811 -- each testset defines its own, and uses it before the next one does
322322
myield[1]
323323
myield[2] # throw fires here; inner doesn't catch
324324

@@ -342,7 +342,7 @@ def outer():
342342
# both see inner's full sequence.
343343
with continuations:
344344
@multishot
345-
def inner():
345+
def inner(): # noqa: F811 -- each testset defines its own, and uses it before the next one does
346346
myield[1]
347347
myield[2]
348348
myield[3]

0 commit comments

Comments
 (0)