Mercurial > public > mercurial-scm > hg-stable
diff mercurial/subrepoutil.py @ 52755:5c48fd4c0e68
typing: introduce a `types` module and a MatcherT alias
This is a proposal to formalise the way we do typing and do more of it.
The initial motivation to make progress is to help break the 100+ module
cycle that is slowing pytype a lot.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 30 Jan 2025 18:22:01 +0100 |
parents | 4cb75772818d |
children |
line wrap: on
line diff
--- a/mercurial/subrepoutil.py Tue Feb 04 14:02:20 2025 -0500 +++ b/mercurial/subrepoutil.py Thu Jan 30 18:22:01 2025 +0100 @@ -57,6 +57,9 @@ ) from .interfaces import status as istatus + from .interfaces.types import ( + MatcherT, + ) # keeps pyflakes happy assert [ @@ -335,7 +338,7 @@ ui: uimod.ui, wctx: context.workingcommitctx, status: istatus.Status, - match: matchmod.basematcher, + match: MatcherT, force: bool = False, ) -> Tuple[List[bytes], Set[bytes], Substate]: """Calculate .hgsubstate changes that should be applied before committing