• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

source-academy / py-slang / 28789248808
81%

Build:
DEFAULT BRANCH: main
Ran 06 Jul 2026 11:51AM UTC
Jobs 1
Files 83
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Jul 2026 11:47AM UTC coverage: 78.307% (+0.004%) from 78.303%
28789248808

push

github

web-flow
Single assignment restriction of Python 1 and Python 2: specs and corrected implementation (#208)

* single assignment

* Fix python_1.tex: drop unrelated typing-table/python_math changes that leaked in

These lines (the python_typing_front/middle_12/back split and the
python_math input) belong to the in-progress operators branch, not to
single assignment, and don't exist as files on this branch — restore
python_1.tex to match main aside from the single-assignment input line.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* gemini review

* Enforce the single-assignment restriction on function/lambda parameters

The spec (docs/specs/python_single_assignment.tex) says a parameter must
not appear on the left-hand side of an assignment within its scope, but
createNoReassignmentValidator only tracked names first seen via an
Assign/AnnAssign/FunctionDef node, so a parameter reassigned by a plain
`=` in the body (e.g. `def f(x): x = 1`) went undetected at Python §1/§2 —
in both the CSE machine and the stepper, since both delegate name
resolution and chapter feature-gating to the same analyze()/Resolver
pipeline.

Environment gains a `parameters` set (the function/lambda's own
parameter names, distinct from `names`, which also accumulates names
assigned in the body). The reassignment validator now seeds each scope's
"already declared" set from it, so assigning a parameter is flagged
exactly like re-assigning any other declared name — while chapters 3/4,
where reassignment is allowed, are unaffected since the validator isn't
wired in there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

2461 of 3409 branches covered (72.19%)

Branch coverage included in aggregate %.

4 of 5 new or added lines in 2 files covered. (80.0%)

5885 of 7249 relevant lines covered (81.18%)

13816.49 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
85.47
0.05% src/resolver/resolver.ts
Jobs
ID Job ID Ran Files Coverage
1 28789248808.1 06 Jul 2026 11:51AM UTC 83
78.31
GitHub Action Run
Source Files on build 28789248808
  • Tree
  • List 83
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28789248808
  • 1ad22655 on github
  • Prev Build on main (#28742804235)
  • Next Build on main (#28800629579)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc