summaryrefslogtreecommitdiff
path: root/django/contrib/postgres/lookups.py
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2022-02-03 20:24:19 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-07 20:37:05 +0100
commit9c19aff7c7561e3a82978a272ecdaad40dda5c00 (patch)
treef0506b668a013d0063e5fba3dbf4863b466713ba /django/contrib/postgres/lookups.py
parentf68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff)
downloaddjango-9c19aff7c7561e3a82978a272ecdaad40dda5c00.tar.gz
Refs #33476 -- Reformatted code with Black.
Diffstat (limited to 'django/contrib/postgres/lookups.py')
-rw-r--r--django/contrib/postgres/lookups.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/django/contrib/postgres/lookups.py b/django/contrib/postgres/lookups.py
index f7c6fc4b0c..9fed0eea30 100644
--- a/django/contrib/postgres/lookups.py
+++ b/django/contrib/postgres/lookups.py
@@ -5,61 +5,61 @@ from .search import SearchVector, SearchVectorExact, SearchVectorField
class DataContains(PostgresOperatorLookup):
- lookup_name = 'contains'
- postgres_operator = '@>'
+ lookup_name = "contains"
+ postgres_operator = "@>"
class ContainedBy(PostgresOperatorLookup):
- lookup_name = 'contained_by'
- postgres_operator = '<@'
+ lookup_name = "contained_by"
+ postgres_operator = "<@"
class Overlap(PostgresOperatorLookup):
- lookup_name = 'overlap'
- postgres_operator = '&&'
+ lookup_name = "overlap"
+ postgres_operator = "&&"
class HasKey(PostgresOperatorLookup):
- lookup_name = 'has_key'
- postgres_operator = '?'
+ lookup_name = "has_key"
+ postgres_operator = "?"
prepare_rhs = False
class HasKeys(PostgresOperatorLookup):
- lookup_name = 'has_keys'
- postgres_operator = '?&'
+ lookup_name = "has_keys"
+ postgres_operator = "?&"
def get_prep_lookup(self):
return [str(item) for item in self.rhs]
class HasAnyKeys(HasKeys):
- lookup_name = 'has_any_keys'
- postgres_operator = '?|'
+ lookup_name = "has_any_keys"
+ postgres_operator = "?|"
class Unaccent(Transform):
bilateral = True
- lookup_name = 'unaccent'
- function = 'UNACCENT'
+ lookup_name = "unaccent"
+ function = "UNACCENT"
class SearchLookup(SearchVectorExact):
- lookup_name = 'search'
+ lookup_name = "search"
def process_lhs(self, qn, connection):
if not isinstance(self.lhs.output_field, SearchVectorField):
- config = getattr(self.rhs, 'config', None)
+ config = getattr(self.rhs, "config", None)
self.lhs = SearchVector(self.lhs, config=config)
lhs, lhs_params = super().process_lhs(qn, connection)
return lhs, lhs_params
class TrigramSimilar(PostgresOperatorLookup):
- lookup_name = 'trigram_similar'
- postgres_operator = '%%'
+ lookup_name = "trigram_similar"
+ postgres_operator = "%%"
class TrigramWordSimilar(PostgresOperatorLookup):
- lookup_name = 'trigram_word_similar'
- postgres_operator = '%%>'
+ lookup_name = "trigram_word_similar"
+ postgres_operator = "%%>"