D4033: check-code: ban use of bare xrange()

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Wed Aug 1 16:19:51 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG882ef6949bdc: check-code: ban use of bare xrange() (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4033?vs=9735&id=9738

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

AFFECTED FILES
  contrib/check-code.py

CHANGE DETAILS

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -511,6 +511,7 @@
     (r'getopt\.getopt', "use pycompat.getoptb instead (py3)"),
     (r'os\.getenv', "use encoding.environ.get instead"),
     (r'os\.setenv', "modifying the environ dict is not preferred"),
+    (r'(?<!pycompat\.)xrange', "use pycompat.xrange instead (py3)"),
   ],
   # warnings
   [],



To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel


More information about the Mercurial-devel mailing list