Commit 18c3d3d
committed
fix: parse parameter strings containing '=' in papermill/translators.py
Change the threshold for skipping lines with multiple equals signs from
nequal > 1 to nequal > 2. Lines like s = 'a=b' have 2 equals signs
(one assignment, one inside the string), but were incorrectly skipped
as unparseable multi-assignments.
Fixes issue #864: Parameter strings cannot contain '='
- Before: s = 'a=b' was skipped (nequal=2, threshold was >1)
- After: s = 'a=b' is correctly parsed (nequal=2, threshold is now >2)
- Multi-assignment lines like a = b = 1 (nequal=3) are still skipped
Also adds a test case for parameter strings with embedded equals.1 parent e4e4ddd commit 18c3d3d
2 files changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
110 | 114 | | |
111 | 115 | | |
112 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| |||
0 commit comments