Removed glob-feature from this branch

This commit is contained in:
Toorero 2021-01-28 15:03:21 +01:00
parent 3491c45316
commit 86f340dd05
3 changed files with 1 additions and 4 deletions

View file

@ -9,7 +9,6 @@ import os
import re import re
from dataclasses import dataclass from dataclasses import dataclass
from pathlib import PurePath from pathlib import PurePath
from pathmatch import wildmatch
from typing import Callable, List, Optional, TypeVar from typing import Callable, List, Optional, TypeVar
from .utils import PathLike, Regex, to_path, to_pattern from .utils import PathLike, Regex, to_path, to_pattern
@ -83,7 +82,7 @@ def predicate(pred: Callable[[PurePath], bool]) -> Transform:
return inner return inner
def glob(pattern: str) -> Transform: def glob(pattern: str) -> Transform:
return predicate(lambda path: wildmatch.match(pattern, str(path))) return predicate(lambda path: path.match(pattern))
def move_dir(source_dir: PathLike, target_dir: PathLike) -> Transform: def move_dir(source_dir: PathLike, target_dir: PathLike) -> Transform:
source_path = to_path(source_dir) source_path = to_path(source_dir)

View file

@ -2,4 +2,3 @@ requests>=2.21.0
beautifulsoup4>=4.7.1 beautifulsoup4>=4.7.1
rich>=2.1.0 rich>=2.1.0
keyring>=21.5.0 keyring>=21.5.0
pathmatch>=0.2.2

View file

@ -9,7 +9,6 @@ setup(
"beautifulsoup4>=4.7.1", "beautifulsoup4>=4.7.1",
"rich>=2.1.0", "rich>=2.1.0",
"keyring>=21.5.0" "keyring>=21.5.0"
"pathmatch>=0.2.2"
], ],
) )