mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
pylint: Skip not-callable
The klass property is referenced to class attribute. Today's Pylint doesn't support this. Fixes: https://pagure.io/freeipa/issue/9117 Signed-off-by: Stanislav Levin <slev@altlinux.org> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
committed by
Rob Crittenden
parent
ba95a377b0
commit
f9d0fc8a8c
@@ -57,7 +57,7 @@ class PrivateExceptionTester:
|
||||
def new(self, **kw):
|
||||
for (key, value) in kw.items():
|
||||
assert not hasattr(self.klass, key), key
|
||||
inst = self.klass(**kw)
|
||||
inst = self.klass(**kw) # pylint: disable=not-callable
|
||||
assert isinstance(inst, Exception)
|
||||
assert isinstance(inst, errors.PrivateError)
|
||||
# pylint: disable=isinstance-second-argument-not-valid-type
|
||||
@@ -218,7 +218,9 @@ class PublicExceptionTester:
|
||||
# Test the instance:
|
||||
for (key, value) in kw.items():
|
||||
assert not hasattr(self.klass, key), key
|
||||
# pylint: disable=not-callable
|
||||
inst = self.klass(format=format, message=message, **kw)
|
||||
# pylint: enable=not-callable
|
||||
for required_class in self.required_classes:
|
||||
assert isinstance(inst, required_class)
|
||||
# pylint: disable=isinstance-second-argument-not-valid-type
|
||||
|
||||
Reference in New Issue
Block a user