summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Grindel <chuck.grindel@gmail.com>2024-02-01 07:04:28 -0700
committerGitHub <noreply@github.com>2024-02-01 07:04:28 -0700
commit1cbb70dfa2a895fb838f9e76da1654c50bae1eb4 (patch)
tree3bacb2de3a8b4cc366c6d9e72866c580a8feb980
parent39ab08d68025550f9bd61010c7dd049496191eb2 (diff)
parent6cad5fb7a673004d732e07a61fcb8301bde513e5 (diff)
downloadbazelbuild-rules_pkg-1cbb70dfa2a895fb838f9e76da1654c50bae1eb4.tar.gz
Use raw string for docstring that contains a backslash (#815)
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
-rw-r--r--pkg/private/tar/build_tar.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/private/tar/build_tar.py b/pkg/private/tar/build_tar.py
index 08a3a06..f4b9f0d 100644
--- a/pkg/private/tar/build_tar.py
+++ b/pkg/private/tar/build_tar.py
@@ -26,7 +26,7 @@ from pkg.private.tar import tar_writer
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.