Skip to content

Commit

Permalink
Improve glob
Browse files Browse the repository at this point in the history
  • Loading branch information
xymy committed Nov 28, 2023
1 parent f126f7e commit 6acf18f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/gethash/utils/glob.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

from natsort import os_sort_keygen

from . import _check_int, _check_str

_ESCAPE_SQUARE = glob.escape("[")
_ESCAPE_SQUARE_BYTES = glob.escape(b"[")

Expand Down Expand Up @@ -55,7 +53,6 @@ def _glob2(path: AnyStr, *, recursive: bool = False, user: bool = False, vars: b


def _get_glob(mode: int) -> Callable[..., Iterator]:
_check_int(mode, "mode")
if mode == 0:
return _glob0
elif mode == 1:
Expand All @@ -67,7 +64,6 @@ def _get_glob(mode: int) -> Callable[..., Iterator]:


def _path_filter(paths: Iterable[AnyStr], *, type: str) -> Iterator[AnyStr]:
_check_str(type, "type")
pred: Callable[[str | bytes], bool]
if type == "a":
pred = os.path.exists
Expand Down

0 comments on commit 6acf18f

Please sign in to comment.