manifest: help pytype to understant `writesubtrees`'s `getnode` type
Since we provide a default, the return of `_lazydirs.get` is cannot be None. We
help pytype to understand that.
--- a/mercurial/manifest.py Mon Aug 05 10:13:31 2024 +0200
+++ b/mercurial/manifest.py Mon Aug 05 10:15:10 2024 +0200
@@ -1407,7 +1407,9 @@
ld = m._lazydirs.get(d)
if ld:
return ld[0]
- return m._dirs.get(d, emptytree)._node
+ tree = m._dirs.get(d, emptytree)
+ assert tree is not None # helps pytype
+ return tree._node
# let's skip investigating things that `match` says we do not need.
visit = match.visitchildrenset(self._dir[:-1])