From 154f02f5bbe7173355f901e0779942d253d41764 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 7 Nov 2021 18:54:17 -0800 Subject: [PATCH] Use r-string for re.match windows drive letter. --- voussoirkit/pathclass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voussoirkit/pathclass.py b/voussoirkit/pathclass.py index 3127666..f789c57 100644 --- a/voussoirkit/pathclass.py +++ b/voussoirkit/pathclass.py @@ -112,7 +112,7 @@ class Path: absolute_path = path.absolute_path else: path = path.strip() - if re.search('^[A-Za-z]:$', path): + if re.match(r'^[A-Za-z]:$', path): # Bare Windows drive letter. path += self.sep path = normalize_sep(path)