Commit 1f40f8d 1 parent 7990fe9 commit 1f40f8d Copy full SHA for 1f40f8d
File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 6
6
from .utils import _get_pyproject
7
7
8
8
if TYPE_CHECKING :
9
- from typing import Any
9
+ from typing import Callable
10
+
11
+ # config options can be one of these types...
12
+ config_val_type = str | bool | None
13
+
14
+ # ... or a callable that returns one of those or a list of strings
15
+ mutable_config_val_type = Callable [[], config_val_type | list [str ]]
16
+ config_options_type = dict [
17
+ str , tuple [config_val_type | mutable_config_val_type , bool ]
18
+ ]
10
19
11
20
12
21
class Config :
@@ -15,7 +24,7 @@ class Config:
15
24
# Mapping from config option to default value (None indicates that option is
16
25
# required) and whether it may be overridden by an environment variable or a config
17
26
# setting.
18
- config_options : "dict[str, tuple[Any, bool]] " = {
27
+ config_options : "config_options_type " = {
19
28
"build-backend" : (None , False ),
20
29
"commit-file" : ("" , False ),
21
30
"dependencies-file" : ("dependencies.yaml" , True ),
You can’t perform that action at this time.
0 commit comments