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

source-academy / py-slang / 29631471367
87%

Build:
DEFAULT BRANCH: main
Ran 18 Jul 2026 05:08AM UTC
Jobs 1
Files 104
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

18 Jul 2026 04:59AM UTC coverage: 80.964% (+0.3%) from 80.647%
29631471367

push

github

web-flow
Overhaul of "wrong type" messages: operators and builtin functions, CSE machine and PVML-in-browser (#273)

* Fix operand-type names leaking JS internals into TypeError messages

Both engines' "unsupported operand type(s)" errors were showing
internal representation names instead of Python type names for
several types -- reported for PVML (`1 + None` said "'null' and
'bigint'" instead of "'NoneType' and 'int'"), but the same class of
bug turned out to affect CSE too.

PVML (src/engines/pvml/types.ts): `PVMLType`'s string values were the
engine's own internal tags (JS `typeof`/`null`/discriminant strings),
used directly in error-message interpolation. Corrected every member
to the name real Python (and the CSE machine's own `typeTranslator`)
would show: NUMBER "number"->"float", BIGINT "bigint"->"int", BOOLEAN
"boolean"->"bool", STRING "string"->"str", NULL "null"->"NoneType",
ARRAY "array"->"list", CLOSURE "closure"->"function", PRIMITIVE
"primitive"->"builtin_function_or_method". COMPLEX was already
correct. UNDEFINED/ITERATOR are internal-only sentinels that can't
reach one of these messages (verified: any local/free-variable read
that would yield JS `undefined` is intercepted by
UnboundLocalError/FreeVariableUnboundError first), left as-is.

CSE (src/engines/cse/types.ts, src/errors/errors.ts): tracing the
equivalent PVML fix's own reference point -- CSE's `typeTranslator` --
surfaced two real, independent bugs of the same kind:
- `typeTranslator`'s switch had no `"list"` case, so `[1,2] + 1`
  reported "'unknown' and 'int'" instead of "'list' and 'int'".
- `src/errors/errors.ts` carried its own separate copy of
  `typeTranslator` (comment: "Local copy to avoid circular import from
  utils"), missing both the `"list"` case above and the `"builtin"`
  case the canonical copy already had -- and the circular-import
  concern the comment cites no longer applies (this file already
  imports `operatorTranslator` from the exact same module). Deleted
  the... (continued)

3423 of 4524 branches covered (75.66%)

Branch coverage included in aggregate %.

173 of 241 new or added lines in 16 files covered. (71.78%)

5 existing lines in 2 files now uncovered.

7508 of 8977 relevant lines covered (83.64%)

80734.93 hits per line

Uncovered Changes

Lines Coverage ∆ File
54
11.01
0.0% src/stdlib/math.ts
8
79.75
0.0% src/stdlib/misc.ts
3
74.39
0.0% src/engines/cse/utils.ts
2
78.61
0.08% src/engines/pvml/pvml-interpreter.ts
1
84.18
5.17% src/engines/pvml/builtins.ts

Coverage Regressions

Lines Coverage ∆ File
3
11.01
0.0% src/stdlib/math.ts
2
79.75
0.0% src/stdlib/misc.ts
Jobs
ID Job ID Ran Files Coverage
1 29631471367.1 18 Jul 2026 05:08AM UTC 104
80.96
GitHub Action Run
Source Files on build 29631471367
  • Tree
  • List 104
  • Changed 18
  • Source Changed 18
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29631471367
  • 4da90465 on github
  • Prev Build on main (#29628807963)
  • Next Build on main (#29634557125)
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