Skip to content

Commit

Permalink
Move global flags to start of regex
Browse files Browse the repository at this point in the history
This prevents the error "re.error: global flags not at the start of the expression at position 35" on Python 3.11
  • Loading branch information
singingwolfboy authored Nov 23, 2022
1 parent 4bc7ae2 commit f67a809
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setupbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,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 '(?ms){res}\\Z'.format(res=res)


def _join_translated(translated_parts, os_sep_class):
Expand Down

0 comments on commit f67a809

Please sign in to comment.