diff -r 7405f8a67611 -r 5c48fd4c0e68 mercurial/interfaces/repository.py --- a/mercurial/interfaces/repository.py Tue Feb 04 14:02:20 2025 -0500 +++ b/mercurial/interfaces/repository.py Thu Jan 30 18:22:01 2025 +0100 @@ -32,7 +32,6 @@ # Almost all mercurial modules are only imported in the type checking phase # to avoid circular imports from .. import ( - match as matchmod, pathutil, util, ) @@ -40,7 +39,10 @@ urlutil, ) - from . import dirstate as intdirstate + from . import ( + dirstate as intdirstate, + matcher, + ) # TODO: make a protocol class for this NodeConstants = Any @@ -1184,7 +1186,7 @@ """Returns a bool indicating if a directory is in this manifest.""" @abc.abstractmethod - def walk(self, match: matchmod.basematcher) -> Iterator[bytes]: + def walk(self, match: matcher.IMatcher) -> Iterator[bytes]: """Generator of paths in manifest satisfying a matcher. If the matcher has explicit files listed and they don't exist in @@ -1195,7 +1197,7 @@ def diff( self, other: Any, # TODO: 'manifestdict' or (better) equivalent interface - match: matchmod.basematcher | None = None, + match: matcher.IMatcher | None = None, clean: bool = False, ) -> dict[ bytes,