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

source-academy / py-slang / 37087546853
88%

Build:
DEFAULT BRANCH: main
Ran 03 Oct 2026 02:01AM UTC
Jobs 1
Files 144
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

03 Oct 2026 01:49AM UTC coverage: 85.548% (-0.06%) from 85.607%
37087546853

push

github

web-flow
Reserve the name range in Python chapters 3 and 4 (#482)

* Reserve the name `range` in Python chapters 3 and 4

`for x in range(...)` is hard-wired in the grammar and in every engine, so
a user binding of `range` only affected ordinary calls, never the loop
header: after `def range(n): return n`, `print(range(3))` printed 3 while
`for i in range(3)` still iterated 0..2. Binding the name in any way is now
a compile-time SyntaxError.

NoRangeRedeclarationValidator rejects assignment, def (name and
parameters), lambda parameters, for targets and from-imports. It is
registered for chapters 3 and 4 only; chapters 1-2 have no `range`. It runs
inside the shared Resolver, so the CSE machine, py2js, the stepper, PVML,
native Pynter, wasm and the Pyodide chapter evaluators all get it.

The evaluator test harness's plugin mock now also provides the data
visualizer methods, so it can drive chapter 2+ evaluators.

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

* Apply the range reservation to the EV3 compilation paths

EV3Engine and Ev3Evaluator build their own Resolver (always compiling as
Python §3) with an empty validator list, so they bypassed the new
NoRangeRedeclarationValidator and still accepted `range = 5` etc. Pass the
chapter 3 validators to both, and cover them in reserved-range.test.ts.

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

---------

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

4943 of 6204 branches covered (79.67%)

Branch coverage included in aggregate %.

41 of 43 new or added lines in 7 files covered. (95.35%)

11122 of 12575 relevant lines covered (88.45%)

167595.78 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
77.78
4.61% src/tests/evaluatorTestHarness.ts
Jobs
ID Job ID Ran Files Coverage
1 37087546853.1 03 Oct 2026 02:01AM UTC 144
85.55
GitHub Action Run
Source Files on build 37087546853
  • Tree
  • List 144
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #37087546853
  • da809720 on github
  • Prev Build on main (#37014747095)
  • Next Build on main (#37090996784)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc