Skip to content

Commit

Permalink
Use raw string for docstring that contains a backslash (#815)
Browse files Browse the repository at this point in the history
Python 3.12 started to complain about invalid escape sequences.
https://docs.python.org/dev/whatsnew/3.12.html#other-language-changes

One supposed to use r""" when dostrings contains backslashes """
https://stackoverflow.com/a/33734332
  • Loading branch information
cgrindel authored Feb 1, 2024
2 parents 39ab08d + 6cad5fb commit 1cbb70d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/private/tar/build_tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


def normpath(path):
"""Normalize a path to the format we need it.
r"""Normalize a path to the format we need it.
os.path.normpath changes / to \ on windows, but tarfile needs / style paths.
Expand Down

0 comments on commit 1cbb70d

Please sign in to comment.