From eb1bacf125a7aa4c8bcf696f1764b641f625267d Mon Sep 17 00:00:00 2001 From: Derek Homeier Date: Wed, 26 Oct 2022 18:22:32 +0200 Subject: [PATCH] Move re-flag in `_translate_glob` to front for Python 3.11 --- setupbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setupbase.py b/setupbase.py index 21a1103f..0da45b6d 100644 --- a/setupbase.py +++ b/setupbase.py @@ -636,7 +636,7 @@ def _translate_glob(pat): translated_parts.append(_translate_glob_part(part)) os_sep_class = "[%s]" % re.escape(SEPARATORS) res = _join_translated(translated_parts, os_sep_class) - return "{res}\\Z(?ms)".format(res=res) + return f"(?ms){res}\\Z" def _join_translated(translated_parts, os_sep_class):