Mypy: Ensure consistency of QuerySet return types in models.py.

Other functions took the form of returning Sequence[T] when the QuerySet
functionality is unused beyond the function, with T being the objects
filtered for in the function body; this commit follows that practice for the
one remaining python2 comment-annotated function, completing the transition
of models.py to py3.5 function annotations.

A note is also added to another function regarding a need to return a
QuerySet, and ideally a QuerySet[T] in line with the other functions, as and
when QuerySet becomes annotated as a generic.
This commit is contained in:
neiljp (Neil Pilgrim)
2018-03-14 23:02:39 +00:00
committed by Tim Abbott
parent a4a8527ec5
commit ce4ac0d2cf
2 changed files with 3 additions and 3 deletions

View File

@@ -480,7 +480,6 @@ def build_custom_checkers(by_lang):
'zerver/lib/cache.py',
'zerver/lib/request.py',
'zerver/lib/stream_subscription.py',
'zerver/models.py',
'zerver/tornado/descriptors.py',
'zerver/views/streams.py',
# thumbor is (currently) python2 only