-
-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Python Version
3.10.11
Django Version
4.2.21
Package Version
1.25.0
Description
Hi Adam 👋
When trying to apply the utils_timezone fixer to some files I noticed it failed to apply some fixes. Below is a simple set of code you can use to reproduce:
from django.utils import timezone
from datetime import datetime
print(datetime.now(tz=timezone.utc))Running django-upgrade --target-version=5.2 --only=utils_timezone simple_reproduction.py will not apply any transforms. At a quick glance it seems like when building the ImportDetails the code isn't looking for ast.ImportFrom nodes when identifying the datetime_module.
Thanks for your work on this package!
Metadata
Metadata
Assignees
Labels
No labels