zulip/zerver
Mateusz Mandera e90866876c queue: Take advantage of ABC for defining abstract worker base classes.
QueueProcessingWorker and LoopQueueProcessingWorker are abstract classes
meant to be subclassed by a class that will define its own consume()
or consume_batch() method. ABCs are suited for that and we can tag
consume/consume_batch with the @abstractmethod wrapper which will
prevent subclasses that don't define these methods properly to be
impossible to even instantiate (as opposed to only crashing once
consume() is called). It's also nicely detected by mypy, which will
throw errors such as this on invalid use:

error: Only concrete class can be given where "Type[TestWorker]" is
expected
error: Cannot instantiate abstract class 'TestWorker' with abstract
attribute 'consume'

Due to it being detected by mypy, we can remove the test
test_worker_noconsume which just tested the old version of this -
raising an exception when the unimplemented consume() gets called. Now
it can be handled already on the linter level.
2019-12-28 10:52:17 -08:00
..
data_import slack import: Map Slack guest users to Zulip guests. 2019-11-12 12:12:59 -08:00
lib generate_test_data: Remove some useless type annotations. 2019-12-13 11:52:23 -08:00
management send_custom_email: Add support for specifying reply-to. 2019-11-18 17:34:01 -08:00
migrations install: Use crudini for storing value of POSTGRES_MISSING_DICTIONARIES. 2019-12-13 12:05:39 -08:00
openapi openapi: Specify responses for users/me/subscriptions PATCH operation. 2019-12-06 11:19:08 -08:00
templatetags openapi: Pass api_url to curl example generation. 2019-08-17 11:35:08 -07:00
tests queue: Take advantage of ABC for defining abstract worker base classes. 2019-12-28 10:52:17 -08:00
tornado tornado: Add transitional code for sender_delivery_email. 2019-11-20 17:31:11 -08:00
views recipients: Remove bulk_get_recipients function and its uses. 2019-12-12 12:00:13 -08:00
webhooks integrations: Deduplicate gogs and gitea integrations. 2019-11-18 12:08:09 -08:00
worker queue: Take advantage of ABC for defining abstract worker base classes. 2019-12-28 10:52:17 -08:00
__init__.py
apps.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
context_processors.py auth: Expand on the external_auth_method abstraction. 2019-12-10 20:16:21 +01:00
decorator.py decorator: Extract require_user_group_edit_permission. 2019-11-18 15:13:29 -08:00
filters.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
forms.py auth: Use zxcvbn to ensure password strength on server side. 2019-11-21 10:23:37 -08:00
logging_handlers.py version: Only let `git describe` match tags beginning with a digit. 2019-10-24 14:54:45 -07:00
middleware.py middleware: Fix exception typing. 2019-07-31 12:23:20 -07:00
models.py bugdown: Fix logic for extracting attachment path_id. 2019-12-12 20:30:26 -08:00
signals.py onboarding: Use delivery_email in "new login" notifications. 2019-11-14 12:19:47 -08:00