Do not allow a None-limit on PaginationConfig. (#14146)

The callers either set a default limit or manually handle a None-limit
later on (by setting a default value).

Update the callers to always instantiate PaginationConfig with a default
limit and then assume the limit is non-None.
This commit is contained in:
Patrick Cloke 2022-10-14 08:30:05 -04:00 committed by GitHub
parent c7446906bd
commit 126a15794c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 29 additions and 50 deletions

View file

@ -1200,8 +1200,6 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
`to_token`), or `limit` is zero.
"""
assert int(limit) >= 0
# Tokens really represent positions between elements, but we use
# the convention of pointing to the event before the gap. Hence
# we have a bit of asymmetry when it comes to equalities.