comparison contrib/check-code.py @ 39823:24e493ec2229

py3: rename pycompat.getcwd() to encoding.getcwd() (API) We need to avoid os.getcwdb() on Windows to avoid DeprecationWarnings, and we need encoding.strtolocal() to encode the result of os.getcwd().
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 21 Sep 2018 19:48:23 -0400
parents c52a8af4052a
children 876494fd967d
comparison
equal deleted inserted replaced
39822:94c25f694ec3 39823:24e493ec2229
501 501
502 py3pats = [ 502 py3pats = [
503 [ 503 [
504 (r'os\.environ', "use encoding.environ instead (py3)", r'#.*re-exports'), 504 (r'os\.environ', "use encoding.environ instead (py3)", r'#.*re-exports'),
505 (r'os\.name', "use pycompat.osname instead (py3)"), 505 (r'os\.name', "use pycompat.osname instead (py3)"),
506 (r'os\.getcwd', "use pycompat.getcwd instead (py3)"), 506 (r'os\.getcwd', "use encoding.getcwd instead (py3)", r'#.*re-exports'),
507 (r'os\.sep', "use pycompat.ossep instead (py3)"), 507 (r'os\.sep', "use pycompat.ossep instead (py3)"),
508 (r'os\.pathsep', "use pycompat.ospathsep instead (py3)"), 508 (r'os\.pathsep', "use pycompat.ospathsep instead (py3)"),
509 (r'os\.altsep', "use pycompat.osaltsep instead (py3)"), 509 (r'os\.altsep', "use pycompat.osaltsep instead (py3)"),
510 (r'sys\.platform', "use pycompat.sysplatform instead (py3)"), 510 (r'sys\.platform', "use pycompat.sysplatform instead (py3)"),
511 (r'getopt\.getopt', "use pycompat.getoptb instead (py3)"), 511 (r'getopt\.getopt', "use pycompat.getoptb instead (py3)"),