Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Aug 8, 2023
1 parent e95784a commit f8d8006
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.rst
Expand Up @@ -8,6 +8,7 @@ Unreleased
- Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``.
:pr:`326`
- Use ``flit_core`` instead of ``setuptools`` as build backend.
- Fix bug in regex substitution in shell completion. :issue:`2581`


Version 8.1.4
Expand Down
2 changes: 1 addition & 1 deletion src/click/shell_completion.py
Expand Up @@ -230,7 +230,7 @@ def func_name(self) -> str:
"""The name of the shell function defined by the completion
script.
"""
safe_name = re.sub(r"\W*", "", self.prog_name.replace("-", "_"), flagsre.ASCII)
safe_name = re.sub(r"\W*", "", self.prog_name.replace("-", "_"), flags=re.ASCII)
return f"_{safe_name}_completion"

def source_vars(self) -> t.Dict[str, t.Any]:
Expand Down

0 comments on commit f8d8006

Please sign in to comment.