diff --git a/importlib_metadata/_meta.py b/importlib_metadata/_meta.py index 0c20eff3..219b2a86 100644 --- a/importlib_metadata/_meta.py +++ b/importlib_metadata/_meta.py @@ -54,11 +54,11 @@ class SimplePath(Protocol): """ def joinpath( - self, other: str | os.PathLike[str] + self, other: str | os.PathLike[str], / ) -> SimplePath: ... # pragma: no cover def __truediv__( - self, other: str | os.PathLike[str] + self, other: str | os.PathLike[str], / ) -> SimplePath: ... # pragma: no cover @property diff --git a/newsfragments/542.bugfix.rst b/newsfragments/542.bugfix.rst new file mode 100644 index 00000000..316e28ba --- /dev/null +++ b/newsfragments/542.bugfix.rst @@ -0,0 +1 @@ +Marked the ``other`` parameter of ``SimplePath.joinpath`` and ``SimplePath.__truediv__`` positional-only, so ``pathlib.Path`` satisfies the protocol under type checkers that compare parameter names.