Skip to content

Commit 59c1fe5

Browse files
caitriona-cloudsmithjayvynl
authored andcommitted
Formatting and linting
1 parent c9ff3fd commit 59c1fe5

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

clickhouse_backend/models/functions/datetime.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class toStartOfFifteenMinutes(toStartOfMinute):
7979
class toStartOfHour(toStartOfMinute):
8080
pass
8181

82+
8283
class toYearWeek(Func):
8384
output_field = fields.UInt32Field()
8485

@@ -93,6 +94,9 @@ def __init__(self, *expressions):
9394
)
9495
)
9596

96-
expressions = (expressions[0], *(models.Value(expr) for expr in expressions[1:]))
97+
expressions = (
98+
expressions[0],
99+
*(models.Value(expr) for expr in expressions[1:]),
100+
)
97101

98-
super().__init__(*expressions)
102+
super().__init__(*expressions)

tests/clickhouse_functions/test_datetime.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def test_tostartofhour(self):
184184
elena.v,
185185
datetime(2023, 11, 30, hour=10, minute=00, second=00),
186186
)
187-
187+
188188
def test_toyearweek(self):
189189
sarah = Author.objects.annotate(v=models.toYearWeek("birthday")).get(
190190
id=self.sarah.id
@@ -196,7 +196,7 @@ def test_toyearweek(self):
196196
)
197197
self.assertEqual(sarah.v, 202352)
198198

199-
sarah = Author.objects.annotate(v=models.toYearWeek("birthday", 1, "Pacific/Kiritimati")).get(
200-
id=self.sarah.id
201-
)
199+
sarah = Author.objects.annotate(
200+
v=models.toYearWeek("birthday", 1, "Pacific/Kiritimati")
201+
).get(id=self.sarah.id)
202202
self.assertEqual(sarah.v, 202401)

0 commit comments

Comments
 (0)