Skip to content

Commit

Permalink
Fix ConfiguredBuildBackendHookCaller type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
ichard26 committed Dec 23, 2024
1 parent 1346ddb commit f37cdae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/pip/_internal/operations/build/metadata_editable.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ def generate_editable_metadata(
except InstallationSubprocessError as error:
raise MetadataGenerationFailed(package_details=details) from error

assert distinfo_dir is not None
return os.path.join(metadata_dir, distinfo_dir)
27 changes: 14 additions & 13 deletions src/pip/_internal/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
Any,
BinaryIO,
Callable,
Dict,
Generator,
Iterable,
Iterator,
List,
Mapping,
Optional,
Sequence,
TextIO,
Tuple,
Type,
Expand Down Expand Up @@ -667,7 +668,7 @@ def __init__(
def build_wheel(
self,
wheel_directory: str,
config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
config_settings: Mapping[str, Any] | None = None,
metadata_directory: Optional[str] = None,
) -> str:
cs = self.config_holder.config_settings
Expand All @@ -678,15 +679,15 @@ def build_wheel(
def build_sdist(
self,
sdist_directory: str,
config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
config_settings: Mapping[str, Any] | None = None,
) -> str:
cs = self.config_holder.config_settings
return super().build_sdist(sdist_directory, config_settings=cs)

def build_editable(
self,
wheel_directory: str,
config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
config_settings: Mapping[str, Any] | None = None,
metadata_directory: Optional[str] = None,
) -> str:
cs = self.config_holder.config_settings
Expand All @@ -695,27 +696,27 @@ def build_editable(
)

def get_requires_for_build_wheel(
self, config_settings: Optional[Dict[str, Union[str, List[str]]]] = None
) -> List[str]:
self, config_settings: Mapping[str, Any] | None = None
) -> Sequence[str]:
cs = self.config_holder.config_settings
return super().get_requires_for_build_wheel(config_settings=cs)

def get_requires_for_build_sdist(
self, config_settings: Optional[Dict[str, Union[str, List[str]]]] = None
) -> List[str]:
self, config_settings: Mapping[str, Any] | None = None
) -> Sequence[str]:
cs = self.config_holder.config_settings
return super().get_requires_for_build_sdist(config_settings=cs)

def get_requires_for_build_editable(
self, config_settings: Optional[Dict[str, Union[str, List[str]]]] = None
) -> List[str]:
self, config_settings: Mapping[str, Any] | None = None
) -> Sequence[str]:
cs = self.config_holder.config_settings
return super().get_requires_for_build_editable(config_settings=cs)

def prepare_metadata_for_build_wheel(
self,
metadata_directory: str,
config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
config_settings: Mapping[str, Any] | None = None,
_allow_fallback: bool = True,
) -> str:
cs = self.config_holder.config_settings
Expand All @@ -728,9 +729,9 @@ def prepare_metadata_for_build_wheel(
def prepare_metadata_for_build_editable(
self,
metadata_directory: str,
config_settings: Optional[Dict[str, Union[str, List[str]]]] = None,
config_settings: Mapping[str, Any] | None = None,
_allow_fallback: bool = True,
) -> str:
) -> str | None:
cs = self.config_holder.config_settings
return super().prepare_metadata_for_build_editable(
metadata_directory=metadata_directory,
Expand Down

0 comments on commit f37cdae

Please sign in to comment.