@@ -388,7 +388,7 @@ def read_text(self, filename) -> Optional[str]:
388388 """
389389
390390 @abc .abstractmethod
391- def locate_file (self , path : os .PathLike [str ]) -> SimplePath :
391+ def locate_file (self , path : str | os .PathLike [str ]) -> SimplePath :
392392 """
393393 Given a path to a file in this distribution, return a SimplePath
394394 to it.
@@ -433,7 +433,7 @@ def discover(
433433 )
434434
435435 @staticmethod
436- def at (path : os .PathLike [str ]) -> "Distribution" :
436+ def at (path : str | os .PathLike [str ]) -> "Distribution" :
437437 """Return a Distribution for the indicated metadata path.
438438
439439 :param path: a string or path-like object
@@ -841,7 +841,7 @@ def __init__(self, path: SimplePath) -> None:
841841 """
842842 self ._path = path
843843
844- def read_text (self , filename : os .PathLike [str ]) -> Optional [str ]:
844+ def read_text (self , filename : str | os .PathLike [str ]) -> Optional [str ]:
845845 with suppress (
846846 FileNotFoundError ,
847847 IsADirectoryError ,
@@ -855,7 +855,7 @@ def read_text(self, filename: os.PathLike[str]) -> Optional[str]:
855855
856856 read_text .__doc__ = Distribution .read_text .__doc__
857857
858- def locate_file (self , path : os .PathLike [str ]) -> SimplePath :
858+ def locate_file (self , path : str | os .PathLike [str ]) -> SimplePath :
859859 return self ._path .parent / path
860860
861861 @property
0 commit comments