Commit 73b9a9f
fix(schema): reject context param not immediately after self/cls
The self_or_cls_skipped flag persisted across all remaining params,
so `def f(self, x: int, ctx: RunContextWrapper)` incorrectly passed
validation. Now only the param at index 1 (immediately after self/cls)
is treated as the effective first param.
Adds a test for this edge case.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 008294b commit 73b9a9f
2 files changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
315 | | - | |
316 | | - | |
| 316 | + | |
| 317 | + | |
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
937 | 949 | | |
938 | 950 | | |
939 | 951 | | |
| |||
0 commit comments