mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
mypy: Enable strict optional for lib/exceptions.
Change return type of reduce_ex to pass under stricter conditions.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from enum import Enum
|
||||
from typing import Any, Dict, List, Optional, Type
|
||||
from mypy_extensions import NoReturn
|
||||
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.utils.translation import ugettext as _
|
||||
@@ -20,7 +21,7 @@ class AbstractEnum(Enum):
|
||||
def value(self) -> None:
|
||||
raise AssertionError("Not implemented")
|
||||
|
||||
def __reduce_ex__(self, proto: int) -> None:
|
||||
def __reduce_ex__(self, proto: int) -> NoReturn:
|
||||
raise AssertionError("Not implemented")
|
||||
|
||||
class ErrorCode(AbstractEnum):
|
||||
|
||||
Reference in New Issue
Block a user