def get_grant(self, state, **kwargs): # try: # _state = kwargs["state"] # if not _state: # _state = self.state # except KeyError: # _state = self.state try: return self.grant[state] except KeyError: raise GrantError("No grant found for state:'%s'" % state)
def get_grant(self, state: str, **kwargs) -> Grant: try: return self.grant[state] except KeyError: raise GrantError("No grant found for state:'%s'" % state)