Commit 6177af0
Fix --omit not working with --source (Issue #74)
The _add_unseen_source_files() method was adding all .py files from
--source directories without checking --omit patterns. This caused
files like __init__.py to appear in coverage reports even when
--omit */__init__.py was specified.
Fix:
- Add omit parameter to Slipcover.__init__()
- Check omit patterns in _add_unseen_source_files() before adding files
- Pass omit patterns from __main__.py to Slipcover
Fixes #74
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 03f0468 commit 6177af0
2 files changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
229 | 230 | | |
230 | 231 | | |
231 | | - | |
| 232 | + | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
| 307 | + | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
| 313 | + | |
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
| |||
590 | 592 | | |
591 | 593 | | |
592 | 594 | | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
593 | 612 | | |
594 | 613 | | |
595 | 614 | | |
| |||
601 | 620 | | |
602 | 621 | | |
603 | 622 | | |
| 623 | + | |
| 624 | + | |
604 | 625 | | |
605 | 626 | | |
606 | 627 | | |
| |||
0 commit comments