Skip to content

Commit 75f3cea

Browse files
committed
config: simplify config schema declaration
It was only split because of the fileset feature. Clean it up now that this no longer exists.
1 parent a98f528 commit 75f3cea

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/tclint/config.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,9 @@ def _validate_config(config: dict, root: pathlib.Path):
240240
241241
root is used to resolve values that may be relative to a certain path.
242242
"""
243-
base_config = {
243+
schema = Schema({
244+
Optional("exclude"): _validate_exclude(root),
245+
Optional("extensions"): _validate_extensions,
244246
Optional("ignore"): _validate_ignore,
245247
# tclint rejects paths to dynamic plugins in the config file. This restriction
246248
# is designed to make it explicit when tclint is executing external code.
@@ -252,13 +254,6 @@ def _validate_config(config: dict, root: pathlib.Path):
252254
Optional("indent-namespace-eval"): _validate_style_indent_namespace_eval,
253255
Optional("spaces-in-braces"): _validate_style_spaces_in_braces,
254256
},
255-
}
256-
257-
schema = Schema({
258-
# exclude and extensions can only be used in global context
259-
Optional("exclude"): _validate_exclude(root),
260-
Optional("extensions"): _validate_extensions,
261-
**base_config,
262257
})
263258

264259
try:

0 commit comments

Comments
 (0)