Mercurial > public > mercurial-scm > hg
comparison mercurial/manifest.py @ 51767:1c28d9fdcd08
manifest: use explicit None checking in `_loadlazy`
This help pytype to understand what is going on with `v` type.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 05 Aug 2024 10:12:37 +0200 |
parents | 3be39e36732a |
children | 8e1b28687704 |
comparison
equal
deleted
inserted
replaced
51766:3be39e36732a | 51767:1c28d9fdcd08 |
---|---|
840 selfdirs[d] = readsubtree(subpath(d), node) | 840 selfdirs[d] = readsubtree(subpath(d), node) |
841 self._lazydirs.clear() | 841 self._lazydirs.clear() |
842 | 842 |
843 def _loadlazy(self, d): | 843 def _loadlazy(self, d): |
844 v = self._lazydirs.get(d) | 844 v = self._lazydirs.get(d) |
845 if v: | 845 if v is not None: |
846 node, readsubtree, docopy = v | 846 node, readsubtree, docopy = v |
847 if docopy: | 847 if docopy: |
848 self._dirs[d] = readsubtree(self._subpath(d), node).copy() | 848 self._dirs[d] = readsubtree(self._subpath(d), node).copy() |
849 else: | 849 else: |
850 self._dirs[d] = readsubtree(self._subpath(d), node) | 850 self._dirs[d] = readsubtree(self._subpath(d), node) |