pre_gen_project

This module contains hooks which are executed before the template is rendered.

Attributes

Functions

main(→ None)

Apply pre-generation hooks.

Module Contents

pre_gen_project.MODULE_REGEX = '^[_a-zA-Z][_a-zA-Z0-9]*$'[source]
pre_gen_project.PYTHONVERSION_REGEX = '^(3\\.(1[0-9]|[2-9][0-9])(\\.[0-9]{1,2})?)$'[source]
pre_gen_project.PYTHONVERSION_MIN = '3.10'[source]
pre_gen_project.EXCEPTION_MSG_MODULE_NAME = Multiline-String[source]
Show Value
"""
ERROR: The project slug ({module_name}) is not a valid Python module name.

Please do not use anything other than letters, numbers, and underscores '_'.
The first character must not be a number.
"""
pre_gen_project.EXCEPTION_MSG_PYTHONVERSION = Multiline-String[source]
Show Value
"""
ERROR: The python version must be >= {min_python_version}, got {python_version}.
"""
pre_gen_project._ = Multiline-String[source]
Show Value
"""{{ cookiecutter.update(
    {
        "__package_name":
        cookiecutter.package_name|lower|replace(' ', '_')|replace('-', '_'),
    }
)}}"""
pre_gen_project.main() None[source]

Apply pre-generation hooks.