Switch Transform to PurePath

This commit is contained in:
Joscha
2020-04-23 17:38:41 +00:00
parent 5ef5a56e69
commit 1ef85c45e5
3 changed files with 12 additions and 13 deletions

View File

@@ -6,11 +6,10 @@ scheme to another.
"""
from dataclasses import dataclass
from pathlib import Path
from pathlib import PurePath
from typing import Callable, List, Optional, TypeVar
Transform = Callable[[Path], Optional[Path]]
Transform = Callable[[PurePath], Optional[PurePath]]
@dataclass
@@ -19,14 +18,14 @@ class Transformable:
An object that can be transformed by a Transform.
"""
path: Path
path: PurePath
TF = TypeVar("TF", bound=Transformable)
def apply_transform(
transform: Callable[[Path], Optional[Path]],
transform: Transform,
transformables: List[TF],
) -> List[TF]:
"""