File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed
Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 66MODULE_NAME : Final = '{{ cookiecutter.project_name }}'
77
88
9- def validate_project_name () -> None :
9+ def _validate_project_name () -> None :
1010 """
1111 This validator is used to ensure that `project_name` is valid.
1212
@@ -29,7 +29,27 @@ def validate_project_name() -> None:
2929 raise ValueError (' ' .join (message ).format (MODULE_NAME ))
3030
3131
32- validators = (validate_project_name ,)
32+ def _validate_deps () -> None :
33+ """Ensure that all deps are installed."""
34+ try :
35+ import lice # noqa: F401, PLC0415
36+ except ImportError :
37+ raise RuntimeError (
38+ 'lice is not installed, please install it before proceeding' ,
39+ ) from None
40+
41+ try :
42+ import jinja2_git # noqa: F401, PLC0415
43+ except ImportError :
44+ raise RuntimeError (
45+ 'jinja2_git is not installed, please install it before proceeding' ,
46+ ) from None
47+
48+
49+ validators = (
50+ _validate_project_name ,
51+ _validate_deps ,
52+ )
3353
3454for validator in validators :
3555 try :
You can’t perform that action at this time.
0 commit comments