zulip/zerver
Zixuan James Li ab1bbdda65 typing: Broaden type annotations for QuerySet compatibility.
To explain the rationale of this change, for example, there is
`get_user_activity_summary` which accepts either a `Collection[UserActivity]`,
where `QuerySet[T]` is not strictly `Sequence[T]` because its slicing behavior
is different from the `Protocol`, making `Collection` necessary.

Similarily, we should have `Iterable[T]` instead of `List[T]` so that
`QuerySet[T]` will also be an acceptable subtype, or `Sequence[T]` when we
also expect it to be indexed.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-07-07 11:27:42 -07:00
..
actions typing: Broaden type annotations for QuerySet compatibility. 2022-07-07 11:27:42 -07:00
data_import user_profile: Fallback to "" for timezone upon creation. 2022-06-28 16:05:24 -07:00
integration_fixtures/nagios tests: Add a test for fixtures for non-webhook integrations. 2021-04-28 08:16:51 -07:00
lib typing: Broaden type annotations for QuerySet compatibility. 2022-07-07 11:27:42 -07:00
management typing: Broaden type annotations for QuerySet compatibility. 2022-07-07 11:27:42 -07:00
migrations migrations: Replace NullBooleanField. 2022-07-05 17:52:08 -07:00
openapi help center: Move typing notifications documentation to a separate page. 2022-07-07 10:42:04 -07:00
tests typing: Broaden type annotations for QuerySet compatibility. 2022-07-07 11:27:42 -07:00
tornado tornado: Ignore StreamClosedError. 2022-06-28 16:35:49 -07:00
views typing: Broaden type annotations for QuerySet compatibility. 2022-07-07 11:27:42 -07:00
webhooks slack_incoming: Simplify empty POST test. 2022-07-05 13:08:35 -07:00
worker message_send: Remove unnecessary user_ids argument. 2022-05-04 14:45:18 -07:00
__init__.py django: Upgrade Zulip to Django 3.2 LTS. 2021-05-03 08:36:22 -07:00
apps.py caching: Make sender type optional for flush_cache. 2021-07-26 14:48:07 -07:00
context_processors.py typing: Apply trivial fixes to adjust edge cases in typing. 2022-05-30 12:03:51 -07:00
decorator.py decorator: Remove unused Union. 2022-07-06 17:20:57 -07:00
filters.py typing: Fix function signatures. 2021-08-20 05:54:19 -07:00
forms.py typing: Access LANGUAGE_CODE via `django.utils.translation.get_language`. 2022-06-28 16:07:18 -07:00
logging_handlers.py python: Use Python 3.8 typing.{Protocol,TypedDict}. 2022-04-27 12:57:49 -07:00
middleware.py middleware: Pass unhandled API exceptions through to the test suite. 2022-06-23 19:23:08 -07:00
models.py models: Introduce functions to check if a flag is present in a UM. 2022-07-07 10:52:36 -07:00
signals.py django: Use HttpRequest.headers. 2022-05-13 20:42:20 -07:00