Skip to content
Myr

Fix incorrect passing of flags to re.sub

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Shantanu · committed by David Lord · parent bb6a872 · Browse files · 2 files+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−1 removed

  • other:+3 added−1 removed

2 files+3 added−1 removed

modified:src/click/shell_completion.py+1 added-1 removed
228 unmodified lines
229 def func_name(self) -> str:230 """The name of the shell function defined by the completion231 script.232 """233 safe_name = re.sub(r"\W*", "", self.prog_name.replace("-", "_"), re.ASCII)233 safe_name = re.sub(r"\W*", "", self.prog_name.replace("-", "_"), flags=re.ASCII)234 return f"_{safe_name}_completion"235236 def source_vars(self) -> t.Dict[str, t.Any]:237 """Vars for formatting :attr:`source_template`.
356 unmodified lines
modified:CHANGES.rst+2 added
3 unmodified lines
4-------------56Unreleased78- Fix issue with regex flags in shell completion. :issue:`2581`91011Version 8.1.612-------------1314Released 2023-07-18
1090 unmodified lines