Skip to content

Commit

Permalink
Add type annotation for Q.__xor__ (#240)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
JakobGM authored May 8, 2024
1 parent fa9ee69 commit 00d234b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions django-stubs/db/models/query_utils.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 00d234b

Please sign in to comment.