From fab589d7f5bb378d97b470cef0550355d34ab7dc Mon Sep 17 00:00:00 2001 From: Stanislav Laznicka Date: Tue, 22 Aug 2017 14:12:40 +0200 Subject: [PATCH] pylint: disable __hash__ for some classes pylint requires all classes implementing __eq__ to also implement __hash__. We disable hashing for the classes that miss the ability, should they ever be required to use it, it can be implemented then. https://pagure.io/freeipa/issue/6874 Reviewed-By: Alexander Bokovoy --- ipalib/aci.py | 2 ++ ipalib/text.py | 1 + ipapython/ipaldap.py | 2 ++ ipatests/util.py | 2 ++ 4 files changed, 7 insertions(+) diff --git a/ipalib/aci.py b/ipalib/aci.py index 73ddc7115..38cc12642 100755 --- a/ipalib/aci.py +++ b/ipalib/aci.py @@ -46,6 +46,8 @@ class ACI(object): entry in LDAP. Has methods to parse an ACI string and export to an ACI String. """ + __hash__ = None + def __init__(self,acistr=None): self.name = None self.source_group = None diff --git a/ipalib/text.py b/ipalib/text.py index f4f810c28..c67479aa4 100644 --- a/ipalib/text.py +++ b/ipalib/text.py @@ -146,6 +146,7 @@ class LazyText(object): """ __slots__ = ('domain', 'localedir', 'key', 'args') + __hash__ = None def __init__(self, domain=None, localedir=None): """ diff --git a/ipapython/ipaldap.py b/ipapython/ipaldap.py index 6ed2e9aff..60c5b9372 100644 --- a/ipapython/ipaldap.py +++ b/ipapython/ipaldap.py @@ -174,6 +174,8 @@ class LDAPEntry(collections.MutableMapping): '_not_list', '_orig_raw', '_raw_view', '_single_value_view') + __hash__ = None + def __init__(self, _conn, _dn=None, _obj=None, **kwargs): """ LDAPEntry constructor. diff --git a/ipatests/util.py b/ipatests/util.py index 575d5cc36..74c5dbc4c 100644 --- a/ipatests/util.py +++ b/ipatests/util.py @@ -247,6 +247,8 @@ class Fuzzy(object): Fuzzy('.+', <... 'str'>, at 0x...>) """ + __hash__ = None + def __init__(self, regex=None, type=None, test=None): """ Initialize.