Skip to content
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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Jul 27, 2024

I plan on bringing RangeMap improvements over to jaraco.collections. Edit: jaraco/jaraco.collections#16

CC @jaraco

@Avasam Avasam requested review from mhammond and jaraco July 27, 2024 04:07
win32/Lib/win32timezone.py Outdated Show resolved Hide resolved
win32/Lib/win32timezone.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@jaraco jaraco left a 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.

Comment on lines -684 to -747
def __le__(self, other):
return self.__dict__ < other.__dict__
Copy link
Collaborator Author

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.

Comment on lines 936 to +945
"""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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Avasam Avasam marked this pull request as ready for review October 15, 2024 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants