Skip to content

Commit

Permalink
Update docstring of safe_name()
Browse files Browse the repository at this point in the history
Co-authored-by: Brian Rutledge <brian@bhrutledge.com>
  • Loading branch information
pablogsal and bhrutledge committed Mar 16, 2021
1 parent d89585c commit 421ae7c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions twine/package.py
Expand Up @@ -48,6 +48,9 @@ def _safe_name(name: str) -> str:
"""Convert an arbitrary string to a standard distribution name.
Any runs of non-alphanumeric/. characters are replaced with a single '-'.
Copied from pkg_resources.safe_name for compatibility with warehouse.
See https://github.com/pypa/twine/issues/743.
"""
return re.sub("[^A-Za-z0-9.]+", "-", name)

Expand Down

0 comments on commit 421ae7c

Please sign in to comment.