From 1b9e03c2e896329793b0e87311a8fa5d71782286 Mon Sep 17 00:00:00 2001 From: wesley Date: Wed, 9 Oct 2024 18:30:18 -0400 Subject: [PATCH] ticket #34699. reformatting documentation, still trying to understand the blacken message. --- docs/ref/models/database-functions.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/ref/models/database-functions.txt b/docs/ref/models/database-functions.txt index ce191681e2..a34af020b4 100644 --- a/docs/ref/models/database-functions.txt +++ b/docs/ref/models/database-functions.txt @@ -678,15 +678,17 @@ Usage example: >>> start = timezone.make_aware(start) >>> exp = Experiment.objects.create(start_datetime=start) >>> find_this_exp = Experiment.objects.annotate( - ... trunc_start=TruncSecond("start_datetime") - ... ).filter(trunc_start__lte=start) - >>> find_this_exp.count() # We expect to find one result but 0 are found + ... trunc_start=TruncSecond("start_datetime") + ... ).filter(trunc_start__lte=start) + >>> find_this_exp.count() ... - 0 - >>> start_adjusted = timezone.localtime(start).replace(tzinfo=zoneinfo.ZoneInfo(key='UTC')) + 0 # We expect to find one result but 0 are found + >>> start_adjusted = timezone.localtime(start).replace( + ... tzinfo=zoneinfo.ZoneInfo(key='UTC') + ... ) >>> find_this_exp_adjusted = Experiment.objects.annotate( - ... trunc_start=TruncSecond("start_datetime") - ... ).filter(trunc_start__lte=start_adjusted) + ... trunc_start=TruncSecond("start_datetime") + ... ).filter(trunc_start__lte=start_adjusted) >>> find_this_exp.count() ... 1