--- a/mercurial/match.py Tue Feb 04 14:02:20 2025 -0500
+++ b/mercurial/match.py Thu Jan 30 18:22:01 2025 +0100
@@ -24,6 +24,9 @@
)
from .i18n import _
+from .interfaces.types import (
+ MatcherT,
+)
from . import (
encoding,
error,
@@ -34,6 +37,10 @@
)
from .utils import stringutil
+from .interfaces import (
+ matcher as int_matcher,
+)
+
rustmod = policy.importrust('dirstate')
allpatternkinds = (
@@ -403,7 +410,7 @@
return kindpats
-class basematcher:
+class basematcher(int_matcher.IMatcher):
def __init__(self, badfn=None):
self._was_tampered_with = False
if badfn is not None:
@@ -1081,7 +1088,7 @@
sub/x.txt: No such file
"""
- def __init__(self, path: bytes, matcher: basematcher) -> None:
+ def __init__(self, path: bytes, matcher: MatcherT) -> None:
super().__init__()
self._path = path
self._matcher = matcher