Python 3 porting mode for make-lint http://docs.pylint.org/features.html#general-options
From eb0565a16934a85df5075a6389dc49239e08f699 Mon Sep 17 00:00:00 2001 From: Christian Heimes <[email protected]> Date: Mon, 3 Aug 2015 11:18:03 +0200 Subject: [PATCH] make-lint Python 3 porting mode
pylint can check code for Python 3 portability. The new option --py3k
enables the Python 3 porting mode of pylint in make-lint.
---
make-lint | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/make-lint b/make-lint
index 0447985303f485a014fecf7d17d0b1c7eb6137bd..04d7f3644bef7fccba1ce37b9d92e2e1405ffd08 100755
--- a/make-lint
+++ b/make-lint
@@ -220,6 +220,8 @@ def main():
dest='fail', default=True, action='store_false')
optparser.add_option('--enable-noerror', help='enable warnings and other non-error messages',
dest='errors_only', default=True, action='store_false')
+ optparser.add_option('--py3k', help='Python 3 porting mode',
+ dest='py3k', default=False, action='store_true')
options, args = optparser.parse_args()
cwd = os.getcwd()
@@ -246,7 +248,10 @@ def main():
'{path}:{line}: [{msg_id}({symbol}), {obj}] {msg})')
linter.set_option('reports', False)
linter.set_option('persistent', False)
- linter.set_option('disable', 'python3')
+ if options.py3k:
+ linter.python3_porting_mode()
+ else:
+ linter.set_option('disable', 'python3')
linter.check(files)
--
2.4.3
signature.asc
Description: OpenPGP digital signature
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
