mypy: Annotate zerver/lib/exceptions.py.

This commit is contained in:
rht
2017-08-14 18:37:38 +02:00
committed by Tim Abbott
parent ea5fef45b5
commit 668af8b6f9

View File

@@ -70,10 +70,12 @@ class JsonableError(Exception):
data_fields = ['widget_name']
def __init__(self, widget_name):
# type: (str) -> None
self.widget_name = widget_name # type: str
@staticmethod
def msg_format():
# type: () -> str
return _("No such widget: {widget_name}")
raise NoSuchWidgetError(widget_name)