kedro/framework/cli/cli.py
def _assert_pkg_name_ok(pkg_name: str):
    """Check that python package name is in line with PEP8 requirements.

    Args:
        pkg_name: Candidate Python package name.

    Raises:
        KedroCliError: If package name violates the requirements.
    """

    base_message = "`{}` is not a valid Python package name.".format(pkg_name)
    if not re.match(r"^[a-zA-Z_]", pkg_name):
        message = base_message + " It must start with a letter or underscore."
        raise KedroCliError(message)
    if len(pkg_name) < 2:
        message = base_message + " It must be at least 2 characters long."
        raise KedroCliError(message)
    if not re.match(r"^\w+$", pkg_name[1:]):
        message = (
            base_message + " It must contain only letters, digits, and/or underscores."
        )
        raise KedroCliError(message)
Check that python package name is in line with PEP8 requirements.

    Args:
        pkg_name: Candidate Python package name.

    Raises:
        KedroCliError: If package name violates the requirements.
    
Check that python package name is in line with PEP8 requirements.
Check that python package name is in line with PEP8 requirements .
def _assert_pkg_name_ok(pkg_name: str):
    base_message = "`{}` is not a valid Python package name.".format(pkg_name)
    if not re.match(r"^[a-zA-Z_]", pkg_name):
        message = base_message + " It must start with a letter or underscore."
        raise KedroCliError(message)
    if len(pkg_name) < 2:
        message = base_message + " It must be at least 2 characters long."
        raise KedroCliError(message)
    if not re.match(r"^\w+$", pkg_name[1:]):
        message = (
            base_message + " It must contain only letters, digits, and/or underscores."
        )
        raise KedroCliError(message)
def _assert_pkg_name_ok ( pkg_name : str ) : base_message = "`{}` is not a valid Python package name." . format ( pkg_name ) if not re . match ( r"^[a-zA-Z_]" , pkg_name ) : message = base_message + " It must start with a letter or underscore." raise KedroCliError ( message ) if len ( pkg_name ) < 2 : message = base_message + " It must be at least 2 characters long." raise KedroCliError ( message ) if not re . match ( r"^\w+$" , pkg_name [ 1 : ] ) : message = ( base_message + " It must contain only letters, digits, and/or underscores." ) raise KedroCliError ( message )
Check that python package name is in line with PEP8 requirements.
Check that python package name is in line with PEP8 requirements .
"""Check that python package name is in line with PEP8 requirements.

    Args:
        pkg_name: Candidate Python package name.

    Raises:
        KedroCliError: If package name violates the requirements.
    """
If package name violates the requirements.
If package name violates the requirements .
KedroCliError
pkg_name
str
Candidate Python package name.
Candidate Python package name .