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

speedyk-005 / chunklet-py / 20155307936 / 5
87%
main: 87%

Build:
Build:
LAST BUILD BRANCH: develop
DEFAULT BRANCH: main
Ran 12 Dec 2025 03:30AM UTC
Files 30
Run time 1s
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

12 Dec 2025 03:28AM UTC coverage: 81.694% (-0.06%) from 81.75%
20155307936.5

push

github

speedyk-005
feat(chunker): Refactor Line De-annotation and Fix Late-Binding Closure Bug

Lint says your code was sus, but now it's iconic. This commit performs critical maintenance and feature stabilization for the code chunker, primarily focusing on eliminating redundant de-annotation and resolving a latent closure bug.

### Bug Fixes

* **Line De-annotation Duplication:** Removed redundant string slicing logic within the chunker's internal processing. The line de-annotation logic was accidentally being called twice: once during the initial regex substitution step, and again via a manual string slice later on. This duplication created ambiguity and was a potential vector for `ghost slicing` where lines could be misinterpreted. We now rely **only** on the regex substitution to perform de-annotation, simplifying the control flow.

* **Late-Binding Closure Fix:** Fixed a classic Python closure bug in the code annotation loop. The original construct `pattern.sub(lambda match: self._annotate_block(tag, match), code)` caused the lambda to reference the final value of `tag` after the loop completed.

    * **The Fix:** Changed to `pattern.sub(lambda match, tag=tag: self._annotate_block(tag, match), code)`. This uses the default argument trick to *capture the current value* of `tag` at definition time, ensuring each regex substitution uses the correct annotation tag.

### Refactoring

* **Default Comments:** Set the `include_comments` parameter to `True` by default in the chunking utility. This aligns with most developer expectations for comprehensive code processing.

* **Code Cleanup:** Minor internal refactoring and code style cleanup (e.g., using explicit variable names for clarity) to enhance readability and maintainability.

1080 of 1322 relevant lines covered (81.69%)

0.82 hits per line

Source Files on job 20155307936.5
  • Tree
  • List 30
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 20155307936
  • ec41faa7 on github
  • Prev Job for on develop (#20108920616.5)
  • Next Job for on develop (#20196809326.2)
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