check-code: ban use of bare xrange()
We want everyone to use pycompat.xrange().
Differential Revision: https://phab.mercurial-scm.org/D4033
--- a/contrib/check-code.py Wed Aug 01 13:00:45 2018 -0700
+++ b/contrib/check-code.py Wed Aug 01 13:08:00 2018 -0700
@@ -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
[],