Apply suggestions from code review of branch yet-another-smart-scan-refactor

Co-authored-by: Joe Knapper <joe.knapper@glasgow.ac.uk>
This commit is contained in:
Julian Stirling 2025-08-06 15:52:52 +00:00
parent 6739a84d7c
commit 2e6ba73345
2 changed files with 5 additions and 1 deletions

View file

@ -128,8 +128,11 @@ def _wrap_and_catch_errors(target, error_buffer, *args, **kwargs):
# Compiled regular expressions for unsafe characters
# Matches anything that isn't a-z, A-Z, 0-9, _, ., -, :, /, \
_WINDOWS_UNSAFE_PATTERN = re.compile(r"[^a-zA-Z0-9_.\-:/\\]")
# Matches anything that isn't a-z, A-Z, 0-9, _, ., -, \
_POSIX_UNSAFE_PATTERN = re.compile(r"[^a-zA-Z0-9_.\-/]")
# Matches anything that isn't a-z, A-Z, 0-9, _, ., -
_NAME_UNSAFE_PATTERN = re.compile(r"[^a-zA-Z0-9_.\-]")