This fixes cases where a backslash appears unescaped in a (normal) Python string and is not part of an escape sequence recognized by Python itself. This fixes many occurrences of DeprecationWarning, particularly but not exclusively in test_specials.py.
While I tried to imitate local style and minimize changes in this PR, it seems to me that the project would benefit from choosing either backslash escaping ("\\") or raw strings (r"\") and sticking with one or the other in almost all cases.
Checklist
[x] I've added this contribution to the changelog.rst.
[x] I installed pre-commit hooks (pip install pre-commit && pre-commit install), and ran black on my code.
[x] Please squash merge this pull request (uncheck if you'd like us to merge as multiple commits)
Description
This fixes cases where a backslash appears unescaped in a (normal) Python string and is not part of an escape sequence recognized by Python itself. This fixes many occurrences of DeprecationWarning, particularly but not exclusively in
test_specials.py
.While I tried to imitate local style and minimize changes in this PR, it seems to me that the project would benefit from choosing either backslash escaping (
"\\"
) or raw strings (r"\"
) and sticking with one or the other in almost all cases.Checklist
changelog.rst
.pip install pre-commit && pre-commit install
), and ranblack
on my code.