manifest: use explicit None checking in `_loaddifflazy`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 05 Aug 2024 10:13:31 +0200
changeset 51772 8e1b28687704
parent 51771 1c28d9fdcd08
child 51773 e2f1efa2bd86
manifest: use explicit None checking in `_loaddifflazy` This helps pytype to understand what is going here with `v2` type.
mercurial/manifest.py
--- a/mercurial/manifest.py	Mon Aug 05 10:12:37 2024 +0200
+++ b/mercurial/manifest.py	Mon Aug 05 10:13:31 2024 +0200
@@ -874,7 +874,7 @@
         toloadlazy = []
         for d, v1 in t1._lazydirs.items():
             v2 = t2._lazydirs.get(d)
-            if not v2 or v2[0] != v1[0]:
+            if v2 is None or v2[0] != v1[0]:
                 toloadlazy.append(d)
         for d, v1 in t2._lazydirs.items():
             if d not in t1._lazydirs: