From afa39e8e08b48fbedd3b8ac94cf58de39ff09c35 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Sep 2024 10:30:18 -0400 Subject: [PATCH] Back out changes to tests._path --- tests/_path.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/_path.py b/tests/_path.py index 30a6c15d..81ab76ac 100644 --- a/tests/_path.py +++ b/tests/_path.py @@ -28,12 +28,12 @@ def symlink_to(self, target): ... # pragma: no cover def _ensure_tree_maker(obj: Union[str, TreeMaker]) -> TreeMaker: - return obj if isinstance(obj, TreeMaker) else pathlib.Path(obj) # type: ignore[return-value] # jaraco/jaraco.path#4 + return obj if isinstance(obj, TreeMaker) else pathlib.Path(obj) # type: ignore[return-value] def build( spec: FilesSpec, - prefix: Union[str, TreeMaker] = pathlib.Path(), # type: ignore[assignment] # jaraco/jaraco.path#4 + prefix: Union[str, TreeMaker] = pathlib.Path(), # type: ignore[assignment] ): """ Build a set of files/directories, as described by the spec. @@ -67,8 +67,7 @@ def build( @functools.singledispatch def create(content: Union[str, bytes, FilesSpec], path): path.mkdir(exist_ok=True) - # Mypy only looks at the signature of the main singledispatch method. So it must contain the complete Union - build(content, prefix=path) # type: ignore[arg-type] # python/mypy#11727 + build(content, prefix=path) # type: ignore[arg-type] @create.register