comparison mercurial/match.py @ 51757:a1e4fa9330d8

typing: add type hints around the matcher for subrepo archiving Mostly this is meant to try to smoke out any other potential issues around the matcher, since these args were mostly previously treated as `Any`, and therefore checking wasn't done.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 01 Aug 2024 11:43:10 -0400
parents bc94cbb49b30
children f4733654f144
comparison
equal deleted inserted replaced
51756:a53162bd73ed 51757:a1e4fa9330d8
1069 >>> m1.bad = bad 1069 >>> m1.bad = bad
1070 >>> m2.bad(b'x.txt', b'No such file') 1070 >>> m2.bad(b'x.txt', b'No such file')
1071 sub/x.txt: No such file 1071 sub/x.txt: No such file
1072 """ 1072 """
1073 1073
1074 def __init__(self, path, matcher): 1074 def __init__(self, path: bytes, matcher: basematcher) -> None:
1075 super(subdirmatcher, self).__init__() 1075 super(subdirmatcher, self).__init__()
1076 self._path = path 1076 self._path = path
1077 self._matcher = matcher 1077 self._matcher = matcher
1078 self._always = matcher.always() 1078 self._always = matcher.always()
1079 1079