mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
mypy: Introduce strict definition of Validator into types.py.
This commit is contained in:
committed by
Tim Abbott
parent
99bae7fa5d
commit
b79c3840da
@@ -1,4 +1,8 @@
|
||||
from typing import TypeVar, Callable
|
||||
from typing import TypeVar, Callable, Optional
|
||||
from django.http import HttpResponse
|
||||
|
||||
ViewFuncT = TypeVar('ViewFuncT', bound=Callable[..., HttpResponse])
|
||||
|
||||
# See zerver/lib/validator.py for more details of Validators,
|
||||
# including many examples
|
||||
Validator = Callable[[str, object], Optional[str]]
|
||||
|
||||
Reference in New Issue
Block a user