From 71d68a47ede0cd5ff8e018b78dcd710ea8a75488 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Tue, 5 Jul 2022 18:26:00 +0200 Subject: [PATCH] refactor(config): By default lead user to sparingly set CFG_KNOWN_SECTION --- .../{{ cookiecutter.__project_slug }}.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/python-naive/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__project_slug }}.py b/python-naive/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__project_slug }}.py index 1079a03..67df9ac 100644 --- a/python-naive/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__project_slug }}.py +++ b/python-naive/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__project_slug }}.py @@ -51,11 +51,8 @@ class CONST(object): # make sense. We use 'is_mandatory' to determine if we have to raise errors on missing settings. Here # 'is_mandatory' means the setting must be given in a '[section]'. It may be empty. CFG_KNOWN_SECTION = [ - {"key": "min_duration", "is_mandatory": False}, - {"key": "max_duration", "is_mandatory": False}, - {"key": "title_not_regex", "is_mandatory": False}, - {"key": "query", "is_mandatory": True}, - {"key": "dl_dir", "is_mandatory": True} + # {"key": "an_option", "is_mandatory": True}, + # {"key": "another_one", "is_mandatory": False} ] CFG_MANDATORY = [section_cfg["key"] for section_cfg in CFG_KNOWN_SECTION if section_cfg["is_mandatory"]] {%- endif %}