From 00d234b80366183148027514891aaace0c408256 Mon Sep 17 00:00:00 2001 From: Jakob Gerhard Martinussen Date: Thu, 9 May 2024 00:09:08 +0200 Subject: [PATCH] Add type annotation for `Q.__xor__` (#240) This PR adds a type annotation for `db.models.query_utils.Q.__xor__`. * Documentation for `Q.__xor__` can be found [here](https://docs.djangoproject.com/en/dev/ref/models/querysets/#xor). * An equivalent implementation in `django-stubs` can be found [here](https://github.com/typeddjango/django-stubs/blob/22706bf43cc7f0d4995670df8d72cff9d0bcf917/django-stubs/db/models/query_utils.pyi#L35). Thanks in advance, - Jakob --- django-stubs/db/models/query_utils.pyi | 1 + 1 file changed, 1 insertion(+) diff --git a/django-stubs/db/models/query_utils.pyi b/django-stubs/db/models/query_utils.pyi index ff0998bcc..f357e2f1c 100644 --- a/django-stubs/db/models/query_utils.pyi +++ b/django-stubs/db/models/query_utils.pyi @@ -37,6 +37,7 @@ class Q(tree.Node): def __init__(self, *args: Any, **kwargs: Any) -> None: ... def __or__(self, other: Any) -> Q: ... def __and__(self, other: Any) -> Q: ... + def __xor__(self, other: Any) -> Q: ... def __invert__(self) -> Q: ... def resolve_expression( self,