MCPcopy Create free account
hub / github.com/conda/constructor / make_app_name

Function make_app_name

constructor/briefcase.py:94–99  ·  view source on GitHub ↗

Takes an arbitrary string with at least one alphanumeric character, and makes it into a valid Python package name.

(name, source)

Source from the content-addressed store, hash-verified

92
93
94def make_app_name(name, source):
95 """Takes an arbitrary string with at least one alphanumeric character, and makes it into a valid Python package name."""
96 app_name = re.sub(r"[^a-z0-9]+", "-", name.lower()).strip("-")
97 if not app_name:
98 raise ValueError(f"{source} contains no alphanumeric characters")
99 return app_name
100
101
102# Some installer types use the reverse domain ID to detect when the product is already

Callers 1

get_bundle_app_nameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected