views/streams: Add missing annotations.

This commit is contained in:
Tim Abbott
2016-07-29 15:53:51 -07:00
parent 92062b9526
commit ef5b5bb45b

View File

@@ -89,10 +89,12 @@ def list_to_streams(streams_raw, user_profile, autocreate=False, invite_only=Fal
class PrincipalError(JsonableError): class PrincipalError(JsonableError):
def __init__(self, principal, status_code=403): def __init__(self, principal, status_code=403):
# type: (text_type, int) -> None
self.principal = principal # type: text_type self.principal = principal # type: text_type
self.status_code = status_code # type: int self.status_code = status_code # type: int
def to_json_error_msg(self): def to_json_error_msg(self):
# type: () -> text_type
return ("User not authorized to execute queries on behalf of '%s'" return ("User not authorized to execute queries on behalf of '%s'"
% (self.principal,)) % (self.principal,))