# HG changeset patch # User Pierre-Yves David # Date 1722845511 -7200 # Node ID 3be39e36732a60cd8430f3ba15f83915106dfd57 # Parent 897972398e61e53c831800dbb7b441245474f63c manifest: clear `_lazydirs` in place in `_loadalllazy` This avoid resetting the type of the dictionary in pytype eyes. This is consistent with the way the dictionary is cleared bits by bits in `_loadalllazy` Having more accurate code will help pytype. We do it in advance to help bisecting and avoid drowning them in the future type annotation noise. diff -r 897972398e61 -r 3be39e36732a mercurial/manifest.py --- a/mercurial/manifest.py Mon Aug 05 10:10:03 2024 +0200 +++ b/mercurial/manifest.py Mon Aug 05 10:11:51 2024 +0200 @@ -838,7 +838,7 @@ selfdirs[d] = readsubtree(subpath(d), node).copy() else: selfdirs[d] = readsubtree(subpath(d), node) - self._lazydirs = {} + self._lazydirs.clear() def _loadlazy(self, d): v = self._lazydirs.get(d)