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

petl-developers / petl / 38112667599
94%

Build:
DEFAULT BRANCH: master
Ran 11 Oct 2026 04:51AM UTC
Jobs 1
Files 134
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

11 Oct 2026 04:49AM UTC coverage: 92.604% (+0.02%) from 92.585%
38112667599

push

github

web-flow
Fix progress UnboundLocalError on tables without rows (#738)

This PR has the objective of fixing `progress()` and `log_progress()` on
a table that yields no rows at all, not even a header.

This happens, for example, when reading an empty CSV file.
`ProgressViewBase.__iter__` uses the loop variable `n` after the loop to
build the final message, but `n` is never assigned when the loop body
doesn't run:

```python
>>> import petl as etl
>>> list(etl.fromcsv('empty.csv').progress())
UnboundLocalError: cannot access local variable 'n' where it is not associated with a value
```

`n` now starts at 0, so the final message reports `0 rows in ...` and
iteration ends normally.

Co-authored-by: Juarez Rudsatz <juarezr@gmail.com>

9 of 9 new or added lines in 2 files covered. (100.0%)

3 existing lines in 2 files now uncovered.

15387 of 16616 relevant lines covered (92.6%)

0.93 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
98.13
-1.19% petl/test/transform/test_selects.py
1
86.5
1.22% petl/transform/selects.py
Jobs
ID Job ID Ran Files Coverage
1 38112667599.1 11 Oct 2026 04:51AM UTC 134
92.6
GitHub Action Run
Source Files on build 38112667599
  • Tree
  • List 134
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 96893972 on github
  • Prev Build on master (#38112458740)
  • Next Build on master (#38112779911)
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