You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just found out ("the hard way", which wasn't that hard) that the utils_timezone fixer did not fix a migration when it imported utc from django.utils.timezone but never used it. The change is still necessary, because the failing import breaks the migration.
I'd like to add a test along the lines of
deftest_unused_import():
check_transformed(
"""\ import datetime from django.utils.timezone import utc do_a_thing() """,
"""\ import datetime do_a_thing() """,
)
(I haven't yet verified that this test fails, but I have verified it isn't there currently...)
The text was updated successfully, but these errors were encountered:
Python Version
3.12.8
Django Version
stable/5.2.x
Package Version
1.22.2
Description
Just found out ("the hard way", which wasn't that hard) that the utils_timezone fixer did not fix a migration when it imported utc from django.utils.timezone but never used it. The change is still necessary, because the failing import breaks the migration.
I'd like to add a test along the lines of
(I haven't yet verified that this test fails, but I have verified it isn't there currently...)
The text was updated successfully, but these errors were encountered: