Commit 2f63d5f
committed
feat: add is_pure flag to debug (default False)
`debug` is side-effecting -- it logs (or prints) on every execution -- so
registering it as `is_pure=True` (the previous default) let Polars
deduplicate repeated uses and drop log output the caller asked for. Add
`is_pure` (keyword-only, default `False`), mirroring `probe`, so repeated
uses are not collapsed by default; a caller with a known-pure input can opt
into dedup. Adds a test that the log-side-effect runs per occurrence.
Signed-off-by: Pascal Tomecek <40371786+ptomecek@users.noreply.github.com>1 parent fab6101 commit 2f63d5f
2 files changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
58 | | - | |
| 61 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
0 commit comments