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

login
register
mail settings
Submitter phabricator
Date Aug. 1, 2018, 8:19 p.m.
Message ID <68537ab196370625b5a48b8e92302d1e@localhost.localdomain>
Download mbox | patch
Permalink /patch/33050/
State Not Applicable
Headers show

Comments

phabricator - Aug. 1, 2018, 8:19 p.m.
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




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

Patch

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
   [],