Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def is_ok(self) -> bool:
"""Returns false if this represents an error, true otherwise."""
return self._canonical_code is StatusCanonicalCode.OK
def __init__(
self,
canonical_code: StatusCanonicalCode = StatusCanonicalCode.OK,
description: typing.Optional[str] = None,
):
self._canonical_code = canonical_code
self._description = description