MCPcopy Create free account
hub / github.com/pytest-dev/pytest-bdd / make_python_name

Function make_python_name

src/pytest_bdd/scenario.py:407–410  ·  view source on GitHub ↗

Make python attribute name out of a given string.

(string: str)

Source from the content-addressed store, hash-verified

405
406
407def make_python_name(string: str) -> str:
408 """Make python attribute name out of a given string."""
409 string = re.sub(PYTHON_REPLACE_REGEX, "", string.replace(" ", "_"))
410 return re.sub(ALPHA_REGEX, "", string).lower()
411
412
413def make_python_docstring(string: str) -> str:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…