Mercurial > hg-stable
changeset 51822:3be39e36732a
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.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 05 Aug 2024 10:11:51 +0200 |
parents | 897972398e61 |
children | 1c28d9fdcd08 |
files | mercurial/manifest.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)