Skip to content

Commit f4f1260

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 05e0ec1 commit f4f1260

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

django_celery_beat/schedulers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ def _get_crontab_exclude_query(self):
299299

300300
# Create a query for tasks with specific hour values only
301301
# This is where we'll do the timezone conversion
302+
from django.db.models import Case, F, IntegerField, When
302303
from django.db.models.functions import Cast
303-
from django.db.models import F, IntegerField, Case, When
304304

305305
# Regex pattern to match only numbers
306306
# This ensures we only process numeric hour values

t/unit/test_schedulers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,9 +1004,10 @@ def test_crontab_timezone_conversion(self, mock_now, mock_get_tz):
10041004
This test mocks the server timezone to Tokyo and tests timezone conversions.
10051005
"""
10061006
# Set up mocks for server timezone and current time
1007-
import pytz
10081007
from datetime import datetime
10091008

1009+
import pytz
1010+
10101011
# Server timezone is Tokyo (UTC+9)
10111012
server_tz = pytz.timezone("Asia/Tokyo")
10121013
mock_get_tz.return_value = server_tz

0 commit comments

Comments
 (0)