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 <abokovoy@redhat.com>
This commit is contained in:
Stanislav Laznicka 2017-08-22 14:12:40 +02:00
parent ae0bd124f5
commit fab589d7f5
4 changed files with 7 additions and 0 deletions

View File

@ -46,6 +46,8 @@ class ACI(object):
entry in LDAP. Has methods to parse an ACI string and export to an entry in LDAP. Has methods to parse an ACI string and export to an
ACI String. ACI String.
""" """
__hash__ = None
def __init__(self,acistr=None): def __init__(self,acistr=None):
self.name = None self.name = None
self.source_group = None self.source_group = None

View File

@ -146,6 +146,7 @@ class LazyText(object):
""" """
__slots__ = ('domain', 'localedir', 'key', 'args') __slots__ = ('domain', 'localedir', 'key', 'args')
__hash__ = None
def __init__(self, domain=None, localedir=None): def __init__(self, domain=None, localedir=None):
""" """

View File

@ -174,6 +174,8 @@ class LDAPEntry(collections.MutableMapping):
'_not_list', '_orig_raw', '_raw_view', '_not_list', '_orig_raw', '_raw_view',
'_single_value_view') '_single_value_view')
__hash__ = None
def __init__(self, _conn, _dn=None, _obj=None, **kwargs): def __init__(self, _conn, _dn=None, _obj=None, **kwargs):
""" """
LDAPEntry constructor. LDAPEntry constructor.

View File

@ -247,6 +247,8 @@ class Fuzzy(object):
Fuzzy('.+', <... 'str'>, <function <lambda> at 0x...>) Fuzzy('.+', <... 'str'>, <function <lambda> at 0x...>)
""" """
__hash__ = None
def __init__(self, regex=None, type=None, test=None): def __init__(self, regex=None, type=None, test=None):
""" """
Initialize. Initialize.