Commit ee649fb
Fix "invalid escape sequence" errors
Starting with Python 3.12 during byte compilation the following warnings
are emitted:
/usr/lib/python3/dist-packages/hamster/lib/datetime.py:471: SyntaxWarning: invalid escape sequence '\s'
position="exact", separator="\s+", default_day=None, ref="now"):
/usr/lib/python3/dist-packages/hamster/lib/datetime.py:472: SyntaxWarning: invalid escape sequence '\s'
"""Parse a start-end range from text.
/usr/lib/python3/dist-packages/hamster/widgets/activityentry.py:381: SyntaxWarning: invalid escape sequence '\s'
fragments = [f for f in re.split("[\s|#]", text)]
/usr/lib/python3/dist-packages/hamster/widgets/timeinput.py:141: SyntaxWarning: invalid escape sequence '\D'
numbers = re.split("\D", str_time)
Fix them by using raw strings or quoting as appropriate.1 parent 81be67e commit ee649fb
File tree
3 files changed
+4
-4
lines changed- src/hamster
- lib
- widgets
3 files changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
| 471 | + | |
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
| 478 | + | |
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
0 commit comments