Return whether `extra` is safe to embed in package-extra syntax. Args: extra: Candidate extra name from CLI or slash-command input. Returns: `True` when the value is a conservative PEP 508-style extra name.
(extra: str)
| 1929 | |
| 1930 | |
| 1931 | def is_valid_extra_name(extra: str) -> bool: |
| 1932 | """Return whether `extra` is safe to embed in package-extra syntax. |
| 1933 | |
| 1934 | Args: |
| 1935 | extra: Candidate extra name from CLI or slash-command input. |
| 1936 | |
| 1937 | Returns: |
| 1938 | `True` when the value is a conservative PEP 508-style extra name. |
| 1939 | """ |
| 1940 | return bool(_EXTRA_NAME_RE.fullmatch(extra)) |
| 1941 | |
| 1942 | |
| 1943 | def is_valid_package_name(package: str) -> bool: |
no outgoing calls
searching dependent graphs…