1
1
from _typeshed import Incomplete , StrPath
2
+ from collections .abc import Iterable
2
3
from typing import Any , ClassVar , Generic , TypeVar
3
4
from typing_extensions import TypeAlias
4
5
@@ -8,14 +9,14 @@ from . import expand
8
9
9
10
SingleCommandOptions : TypeAlias = dict [str , tuple [str , Any ]]
10
11
AllCommandOptions : TypeAlias = dict [str , SingleCommandOptions ]
11
- Target = TypeVar ("Target" , bound = Distribution | DistributionMetadata ) # noqa: Y001 # Exists at runtime
12
+ Target = TypeVar ("Target" , Distribution , DistributionMetadata ) # noqa: Y001 # Exists at runtime
12
13
13
14
def read_configuration (
14
15
filepath : StrPath , find_others : bool = False , ignore_option_errors : bool = False
15
16
) -> dict [Incomplete , Incomplete ]: ...
16
17
def apply_configuration (dist : Distribution , filepath : StrPath ) -> Distribution : ...
17
18
def configuration_to_dict (
18
- handlers : tuple [ConfigHandler [Distribution | DistributionMetadata ], ...]
19
+ handlers : Iterable [ConfigHandler [Distribution ] | ConfigHandler [ DistributionMetadata ]],
19
20
) -> dict [Incomplete , Incomplete ]: ...
20
21
def parse_configuration (
21
22
distribution : Distribution , command_options : AllCommandOptions , ignore_option_errors : bool = False
@@ -47,15 +48,15 @@ class ConfigMetadataHandler(ConfigHandler[DistributionMetadata]):
47
48
aliases : ClassVar [dict [str , str ]]
48
49
strict_mode : bool
49
50
package_dir : dict [Incomplete , Incomplete ] | None
50
- root_dir : StrPath
51
+ root_dir : StrPath | None
51
52
def __init__ (
52
53
self ,
53
54
target_obj : DistributionMetadata ,
54
55
options : AllCommandOptions ,
55
56
ignore_option_errors : bool ,
56
57
ensure_discovered : expand .EnsurePackagesDiscovered ,
57
58
package_dir : dict [Incomplete , Incomplete ] | None = None ,
58
- root_dir : StrPath = "." ,
59
+ root_dir : StrPath | None = "." ,
59
60
) -> None : ...
60
61
@property
61
62
def parsers (self ): ...
0 commit comments