Found using mypy 0.990.
Newer mypy versions see the check as tautological because `self.func` is
typed as always being `Callable` and thus always true. I don't know if
the typing is wrong or if the if-block is tautological (and redundant).
For now, silence the error by using `getattr` instead of direct
attribute access.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
"description": self.description,
"name": self.name,
"status": self.status,
- "valid": True if self.func else False
+ "valid": True if getattr(self, 'func', None) else False
}