mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
mypy: Annotate zerver/lib/exceptions.py.
This commit is contained in:
@@ -70,10 +70,12 @@ class JsonableError(Exception):
|
|||||||
data_fields = ['widget_name']
|
data_fields = ['widget_name']
|
||||||
|
|
||||||
def __init__(self, widget_name):
|
def __init__(self, widget_name):
|
||||||
|
# type: (str) -> None
|
||||||
self.widget_name = widget_name # type: str
|
self.widget_name = widget_name # type: str
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def msg_format():
|
def msg_format():
|
||||||
|
# type: () -> str
|
||||||
return _("No such widget: {widget_name}")
|
return _("No such widget: {widget_name}")
|
||||||
|
|
||||||
raise NoSuchWidgetError(widget_name)
|
raise NoSuchWidgetError(widget_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user