-
Notifications
You must be signed in to change notification settings - Fork 798
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
Completely type win32timezone
#2334
base: main
Are you sure you want to change the base?
Conversation
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.
It's been forever since I've touched this code and it was my first meaningful open source contribution in Python, so I'm sure it has some crufty approaches. Thanks for modernizing it.
def __le__(self, other): | ||
return self.__dict__ < other.__dict__ |
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.
In #1990 I updated __cmp__
for __le__
, but that doesn't make sense for dicts. Comparisons of TimeZoneInfo
has been broken since Python 3 anyway so removing this doesn't remove any functionality.
"""Resolve a multilingual user interface resource for the time zone name | ||
|
||
spec should be of the format @path,-stringID[;comment] | ||
see http://msdn2.microsoft.com/en-us/library/ms725481.aspx for details | ||
|
||
>>> import sys | ||
>>> result = resolveMUITimeZone('@tzres.dll,-110') | ||
>>> expectedResultType = [type(None),str][sys.getwindowsversion() >= (6,)] | ||
>>> type(result) is expectedResultType | ||
True |
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.
I had accidentally removed a bit too much in https://github.com/mhammond/pywin32/pull/2085/files#diff-e5d2b4683af028d6a25d25c862c248214190080072e6f07171106c56dd7812dc
…into type-win32timezone
*args
/*kwargs
params)TimeZoneInfo.tzname
(see Fix bugs in TimeZoneInfo.tzname #2337).RangeMap
fromjaraco.collections
& MadeRangeMap
generictzname
handlesNone
param as per the official docFixedFixTimeZoneDefinition
creation from aTIME_ZONE_INFORMATION
orDYNAMIC_TIME_ZONE_INFORMATION
(used to crash):win32timezone.TimeZoneInfo.__init_from_other
and added tests #2339I plan on bringing
RangeMap
improvements over tojaraco.collections
. Edit: jaraco/jaraco.collections#16CC @jaraco