11from _typeshed import Incomplete , StrPath
2+ from collections .abc import Iterable
23from typing import Any , ClassVar , Generic , TypeVar
34from typing_extensions import TypeAlias
45
@@ -8,14 +9,14 @@ from . import expand
89
910SingleCommandOptions : TypeAlias = dict [str , tuple [str , Any ]]
1011AllCommandOptions : 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
1213
1314def read_configuration (
1415 filepath : StrPath , find_others : bool = False , ignore_option_errors : bool = False
1516) -> dict [Incomplete , Incomplete ]: ...
1617def apply_configuration (dist : Distribution , filepath : StrPath ) -> Distribution : ...
1718def configuration_to_dict (
18- handlers : tuple [ConfigHandler [Distribution | DistributionMetadata ], ...]
19+ handlers : Iterable [ConfigHandler [Distribution ] | ConfigHandler [ DistributionMetadata ]],
1920) -> dict [Incomplete , Incomplete ]: ...
2021def parse_configuration (
2122 distribution : Distribution , command_options : AllCommandOptions , ignore_option_errors : bool = False
@@ -47,15 +48,15 @@ class ConfigMetadataHandler(ConfigHandler[DistributionMetadata]):
4748 aliases : ClassVar [dict [str , str ]]
4849 strict_mode : bool
4950 package_dir : dict [Incomplete , Incomplete ] | None
50- root_dir : StrPath
51+ root_dir : StrPath | None
5152 def __init__ (
5253 self ,
5354 target_obj : DistributionMetadata ,
5455 options : AllCommandOptions ,
5556 ignore_option_errors : bool ,
5657 ensure_discovered : expand .EnsurePackagesDiscovered ,
5758 package_dir : dict [Incomplete , Incomplete ] | None = None ,
58- root_dir : StrPath = "." ,
59+ root_dir : StrPath | None = "." ,
5960 ) -> None : ...
6061 @property
6162 def parsers (self ): ...
0 commit comments