From f9d0fc8a8c7fd290492645cb1d90367ee99ad5cd Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Thu, 29 Jul 2021 14:08:16 +0300 Subject: [PATCH] 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 Reviewed-By: Rob Crittenden --- ipatests/test_ipalib/test_errors.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ipatests/test_ipalib/test_errors.py b/ipatests/test_ipalib/test_errors.py index b63d04354..041b0234d 100644 --- a/ipatests/test_ipalib/test_errors.py +++ b/ipatests/test_ipalib/test_errors.py @@ -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