zulip/zerver
Anders Kaseorg 7e9db327b3 request: Improve validator type so mypy can check it against REQ.
Old: a validator returns None on success and returns an error string
on error.

New: a validator returns the validated value on success and raises
ValidationError on error.

This allows mypy to catch mismatches between the annotated type of a
REQ parameter and the type that the validator actually validates.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-20 22:29:15 -07:00
..
data_import python: Convert more percent formatting to Python 3.6 f-strings. 2020-06-14 23:27:22 -07:00
lib request: Improve validator type so mypy can check it against REQ. 2020-06-20 22:29:15 -07:00
management i18n: Add regex for nested handlebars i18n. 2020-06-17 17:56:57 -07:00
migrations models: Change attachment.size to not be nullable. 2020-06-20 13:15:02 -07:00
openapi openapi: Fix validate_against_openapi_schema nested object validation. 2020-06-20 13:23:39 -07:00
templatetags openapi: Parse {!api-admin-only.md!} in OpenAPI markdown extension. 2020-06-19 11:04:46 -07:00
tests request: Improve validator type so mypy can check it against REQ. 2020-06-20 22:29:15 -07:00
tornado get_events_backend: Validate narrow type correctly. 2020-06-20 22:29:15 -07:00
views request: Improve validator type so mypy can check it against REQ. 2020-06-20 22:29:15 -07:00
webhooks papertrail: Replace custom validator with check_dict. 2020-06-20 22:29:15 -07:00
worker CVE-2020-14215: Fix validation in PreregistrationUser queries. 2020-06-16 23:35:39 -07:00
__init__.py
apps.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
context_processors.py auth: Make apple log in and sign up buttons consistent with others. 2020-06-18 13:06:10 -07:00
decorator.py python: Combine some split import groups. 2020-06-18 15:54:11 -07:00
filters.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
forms.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
logging_handlers.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
middleware.py python: Manually convert more percent-formatting to f-strings. 2020-06-14 23:27:22 -07:00
models.py request: Improve validator type so mypy can check it against REQ. 2020-06-20 22:29:15 -07:00
signals.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00