[Updated] D11235: typing: add several assertions to dirstatemap to appease pytype

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Fri Jul 30 15:11:22 UTC 2021


Closed by commit rHG460e479be66e: typing: add several assertions to dirstatemap to appease pytype (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11235?vs=29745&id=29746

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11235/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D11235

AFFECTED FILES
  mercurial/dirstatemap.py

CHANGE DETAILS

diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -209,6 +209,9 @@
         else:
             assert size != FROM_P2
             assert size != NONNORMAL
+            assert size is not None
+            assert mtime is not None
+
             state = b'n'
             size = size & rangemask
             mtime = mtime & rangemask



To: mharbison72, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210730/e2c8f21d/attachment-0002.html>


More information about the Mercurial-patches mailing list