diff --git a/freeipa.spec.in b/freeipa.spec.in index d04ff4ec8..214731805 100644 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -175,7 +175,7 @@ BuildRequires: python-gssapi >= 1.2.0-5 %if 0%{?fedora} >= 26 BuildRequires: python2-pylint %else -BuildRequires: pylint >= 1.6 +BuildRequires: pylint >= 1.7 %endif # workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1096506 BuildRequires: python2-polib @@ -214,7 +214,7 @@ BuildRequires: python2-augeas # 1.6: x509.Name.rdns (https://github.com/pyca/cryptography/issues/3199) BuildRequires: python3-cryptography >= 1.6 BuildRequires: python3-gssapi >= 1.2.0 -BuildRequires: python3-pylint >= 1.6 +BuildRequires: python3-pylint >= 1.7 # workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1096506 BuildRequires: python3-polib BuildRequires: python3-libipa_hbac diff --git a/ipalib/cli.py b/ipalib/cli.py index 3196687f0..21563befb 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -999,7 +999,9 @@ class Collector(object): value = v + (value,) else: value = (v, value) + # pylint: disable=unsupported-assignment-operation self.__options[name] = value + # pylint: enable=unsupported-assignment-operation object.__setattr__(self, name, value) def __todict__(self): diff --git a/ipalib/config.py b/ipalib/config.py index 134772c40..151c4b4a8 100644 --- a/ipalib/config.py +++ b/ipalib/config.py @@ -273,7 +273,9 @@ class Env(object): if type(value) not in (unicode, int, float, bool, type(None), DN): raise TypeError(key, value) object.__setattr__(self, key, value) + # pylint: disable=unsupported-assignment-operation self.__d[key] = value + # pylint: enable=unsupported-assignment-operation def __getitem__(self, key): """ diff --git a/ipaserver/plugins/schema.py b/ipaserver/plugins/schema.py index 1dbbec5f0..b52500696 100644 --- a/ipaserver/plugins/schema.py +++ b/ipaserver/plugins/schema.py @@ -377,8 +377,10 @@ class topic_(MetaObject): 'full_name': topic_full_name, } topics.append(topic) + # pylint: disable=unsupported-assignment-operation topics_by_key[topic_name] = topic topics_by_key[topic_full_name] = topic + # pylint: enable=unsupported-assignment-operation for package in self.api.packages: module_name = '.'.join((package.__name__, topic_name)) diff --git a/ipatests/test_ipapython/test_dn.py b/ipatests/test_ipapython/test_dn.py index 0f004c581..4dd32366b 100644 --- a/ipatests/test_ipapython/test_dn.py +++ b/ipatests/test_ipapython/test_dn.py @@ -528,6 +528,7 @@ class TestRDN(unittest.TestCase): def test_assignments(self): rdn = RDN((self.attr1, self.value1)) with self.assertRaises(TypeError): + # pylint: disable=unsupported-assignment-operation rdn[0] = self.ava2 def test_iter(self): @@ -954,8 +955,10 @@ class TestDN(unittest.TestCase): def test_assignments(self): dn = DN('t=0,t=1,t=2,t=3,t=4,t=5,t=6,t=7,t=8,t=9') with self.assertRaises(TypeError): + # pylint: disable=unsupported-assignment-operation dn[0] = RDN('t=a') with self.assertRaises(TypeError): + # pylint: disable=unsupported-assignment-operation dn[0:1] = [RDN('t=a'), RDN('t=b')] def test_iter(self): diff --git a/pylintrc b/pylintrc index d638b459f..462b96cb0 100644 --- a/pylintrc +++ b/pylintrc @@ -92,7 +92,6 @@ disable= 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 [REPORTS]