From eca95db763ac9a32c20da19d1b177319c008ce23 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 28 May 2020 18:19:20 +0200 Subject: [PATCH] Finish the documentation of normalize_path Signed-off-by: Gilles Peskine --- tests/scripts/check-files.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/scripts/check-files.py b/tests/scripts/check-files.py index b6fa98926..62b526ab9 100755 --- a/tests/scripts/check-files.py +++ b/tests/scripts/check-files.py @@ -46,8 +46,10 @@ class FileIssueTracker: @staticmethod def normalize_path(filepath): - """Normalize ``filepath`` """ + """Normalize ``filepath`` with / as the directory separator.""" filepath = os.path.normpath(filepath) + # On Windows, we may have backslashes to separate directories. + # We need slashes to match exemption lists. seps = os.path.sep if os.path.altsep is not None: seps += os.path.altsep