Skip to content

Commit

Permalink
style: apply linting
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverHofkens committed Dec 15, 2023
1 parent 6e22c19 commit 983fbd1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions odata_query/django/django_q.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import operator
from contextlib import contextmanager
from functools import wraps
from typing import Any, Callable, Dict, List, Optional, Type, Union
from uuid import UUID
Expand Down Expand Up @@ -61,6 +60,7 @@ def wrapper(*args, **kwargs):
"Cannot use geography functions because GeoDjango failed to load."
) from _gis_error
return func(*args, **kwargs)

return wrapper


Expand Down Expand Up @@ -339,7 +339,9 @@ def visit_CollectionLambda(self, node: ast.CollectionLambda) -> Q:
raise NotImplementedError()

@requires_gis
def djangofunc_geo__intersects(self, field: ast.Identifier, geography: ast.Geography):
def djangofunc_geo__intersects(
self, field: ast.Identifier, geography: ast.Geography
):
return Q(**{field.name + "__" + "intersects": GEOSGeometry(geography.wkt())})

@requires_gis
Expand Down

0 comments on commit 983fbd1

Please sign in to comment.