models: Redefine Query to be more usable for type hinting

master
Felix Stupp 2 years ago committed by Felix Stupp
parent 85363aed4b
commit cc8cb6b072
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -43,7 +43,17 @@ DO NOT CAST STRINGS WHICH MAY BE SET BY USERS TO PREVENT SQL INJECTION ATTACKS.
T = TypeVar("T")
Query = Union[List[T], PonyQuery]
class Query(
List[T],
PonyQuery,
):
"""
This class may be used to reflect PonyQuerys with all their "kind of" list behavior.
Only use it for type hintings.
"""
pass
THUMBNAIL_ALLOWED_TYPES = [

Loading…
Cancel
Save