Skip to content

Commit

Permalink
Fix locate_file() type hints for older Pythons
Browse files Browse the repository at this point in the history
🤦
  • Loading branch information
ichard26 committed Jan 26, 2025
1 parent 984c399 commit 9db104c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pip/_internal/metadata/importlib/_dists.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
Mapping,
Optional,
Sequence,
Union,
cast,
)

Expand Down Expand Up @@ -96,7 +97,7 @@ def read_text(self, filename: str) -> Optional[str]:
raise UnsupportedWheel(error)
return text

def locate_file(self, path: str | PathLike[str]) -> pathlib.Path:
def locate_file(self, path: Union[str, "PathLike[str]"]) -> pathlib.Path:
# This method doesn't make sense for our in-memory wheel, but the API
# requires us to define it.
raise NotImplementedError
Expand Down

0 comments on commit 9db104c

Please sign in to comment.