-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix datetime imports #2787
Fix datetime imports #2787
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2787 +/- ##
==========================================
+ Coverage 94.57% 95.94% +1.37%
==========================================
Files 379 379
Lines 53886 53842 -44
==========================================
+ Hits 50964 51661 +697
+ Misses 2922 2181 -741
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Pull Request Test Coverage Report for Build 8783919300Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, nasty... Thanks for fixing this!
Variables previously named dt
are now called date
. I think this might be misleading in some cases. Sometimes it's a date, sometimes a timestamp with more precision, sometimes an offset or a timedelta. Obviously the previous name wasn't any better, so feel free to ignore this if takes too much time :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the hard work!
In many places, we have used
from datetime import datetime
. This is bad, since it masks the module for further imports:Sorting these the other way around will cause complaints from flake8/ruff.
This PR changes all of these import to
import datetime as dt
, so we need on the single import to access other items:This is a change that makes implementing the timezone aware datetimes of #2752 easier.
AUTHORS.md
if not there already