[Updated] D11911: pytype: stop excluding upgrade.py

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Fri Dec 17 11:09:48 UTC 2021


Closed by commit rHGa4d8de93023c: pytype: stop excluding upgrade.py (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11911?vs=31468&id=31505

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

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

AFFECTED FILES
  mercurial/upgrade.py
  tests/test-check-pytype.t

CHANGE DETAILS

diff --git a/tests/test-check-pytype.t b/tests/test-check-pytype.t
--- a/tests/test-check-pytype.t
+++ b/tests/test-check-pytype.t
@@ -40,7 +40,6 @@
 mercurial/testing/storage.py  # tons of [attribute-error]
 mercurial/ui.py               # [attribute-error], [wrong-arg-types]
 mercurial/unionrepo.py        # ui, svfs, unfiltered [attribute-error]
-mercurial/upgrade.py          # line 84, in upgraderepo: No attribute 'discard' on Dict[nothing, nothing] [attribute-error]
 mercurial/util.py             # [attribute-error], [wrong-arg-count]
 mercurial/utils/procutil.py   # [attribute-error], [module-attr], [bad-return-type]
 mercurial/utils/stringutil.py # [module-attr], [wrong-arg-count]
@@ -88,7 +87,6 @@
   >    -x mercurial/thirdparty \
   >    -x mercurial/ui.py \
   >    -x mercurial/unionrepo.py \
-  >    -x mercurial/upgrade.py \
   >    -x mercurial/utils/procutil.py \
   >    -x mercurial/utils/stringutil.py \
   >    -x mercurial/utils/memorytop.py \
diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py
--- a/mercurial/upgrade.py
+++ b/mercurial/upgrade.py
@@ -42,7 +42,7 @@
 ):
     """Upgrade a repository in place."""
     if optimize is None:
-        optimize = {}
+        optimize = set()
     repo = repo.unfiltered()
 
     specified_revlogs = {}



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


More information about the Mercurial-patches mailing list