Skip to content

Commit

Permalink
Fix mypy Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Sep 26, 2024
1 parent ff306c1 commit bb29bb7
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion wcmatch/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,23 @@ def globmatch(
exclude=exclude
)

full_match = globmatch
def full_match( # type: ignore[override, unused-ignore]
self,
patterns: str | Sequence[str],
*,
flags: int = 0,
limit: int = _wcparse.PATTERN_LIMIT,
exclude: str | Sequence[str] | None = None
) -> bool:
"""Alias for Python 3.13 `full_match`, but redirects to use `globmatch`."""

return glob.globmatch(
self._translate_path(),
patterns,
flags=self._translate_flags(flags),
limit=limit,
exclude=exclude
)


class Path(pathlib.Path):
Expand Down

0 comments on commit bb29bb7

Please sign in to comment.