Skip to content

Commit 23631f6

Browse files
committed
Fix pre-commit and loose print statements
1 parent cc80665 commit 23631f6

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

django_mongodb_backend/query_conversion/expression_converters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def convert_expression(expr):
123123
Optimized match condition or None if not optimizable
124124
"""
125125
if isinstance(expr, dict) and len(expr) == 1:
126-
op = list(expr.keys())[0]
126+
op = next(iter(expr.keys()))
127127
if op in OPTIMIZABLE_OPS:
128128
return OPTIMIZABLE_OPS[op].optimize(expr[op])
129129
return None

django_mongodb_backend/query_conversion/query_optimizer.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,10 @@ def _process_expression(self, expr, match_conditions, remaining_conditions):
7373
if not has_and and not has_or:
7474
# Process single condition
7575
optimized = convert_expression(expr)
76-
print(f"{expr=}")
7776
if optimized:
7877
match_conditions.append({"$match": optimized})
7978
else:
8079
remaining_conditions.append(expr)
81-
print(f"{match_conditions=}")
82-
print(f"{remaining_conditions=}")
8380
else:
8481
# Can't optimize
8582
remaining_conditions.append(expr)

0 commit comments

Comments
 (0)