URL: https://github.com/freeipa/freeipa/pull/825
Author: MartinBasti
 Title: #825: Pylint 1.7 fixes
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/825/head:pr825
git checkout pr825
From 6044611905509ccfdc2ebb8fb6a8ed75655db1d6 Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Fri, 26 May 2017 21:21:34 +0200
Subject: [PATCH 1/2] Pylint: fix ipa_forbidden_import checker

Pylint 1.7 changed internals, so we have update our custom checker

https://pagure.io/freeipa/issue/6874
---
 pylint_plugins.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pylint_plugins.py b/pylint_plugins.py
index 472328cc42..b17e7db81a 100644
--- a/pylint_plugins.py
+++ b/pylint_plugins.py
@@ -311,7 +311,7 @@ def open(self):
         self._forbidden_imports_stack = []
 
     def _get_forbidden_import_rule(self, node):
-        path = node.source_file
+        path = node.path
         if path:
             path = os.path.abspath(path)
             while path.startswith(self._dir):

From 2f9dc5b73e312fedbb77c8d2cddcaecd08df72f2 Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Fri, 26 May 2017 21:41:40 +0200
Subject: [PATCH 2/2] pylint: ignore new checks added in 1.7

New checks will be temporarily disabled until fixed.

https://pagure.io/freeipa/issue/6874
---
 pylintrc | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/pylintrc b/pylintrc
index f92adeea8b..8cb86319eb 100644
--- a/pylintrc
+++ b/pylintrc
@@ -84,7 +84,16 @@ disable=
     singleton-comparison,
     misplaced-comparison-constant,
     not-a-mapping,
-    singleton-comparison
+    singleton-comparison,
+    len-as-condition,  # new in pylint 1.7
+    no-else-return,  # new in pylint 1.7
+    literal-comparison,  # new in pylint 1.7
+    single-string-used-for-slots,  # new in pylint 1.7
+    useless-super-delegation,  # new in pylint 1.7
+    redefined-argument-from-local,  # new in pylint 1.7
+    consider-merging-isinstance,  # new in pylint 1.7
+    unsupported-assignment-operation  # new in pylint 1.7
+    consider-iterating-dictionary,  # wontfix for better python2/3 code
 
 
 [REPORTS]
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to