A name should be alphanumeric values, underscores, and hyphens but not start with an underscore
(name: str)
| 646 | |
| 647 | |
| 648 | def is_valid_name(name: str) -> bool: |
| 649 | """A name should be alphanumeric values, underscores, and hyphens but not start with an underscore""" |
| 650 | return ( |
| 651 | not name.startswith(("_", "-")) and re.compile(r"[^\w-]+").search(name) is None |
| 652 | ) |
| 653 | |
| 654 | |
| 655 | def generate_project_name() -> str: |
no outgoing calls