-
-
Notifications
You must be signed in to change notification settings - Fork 732
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
Python 3.10 improvements #1139
base: main
Are you sure you want to change the base?
Python 3.10 improvements #1139
Conversation
assert res | ||
groups = [int(d) for d in res.groups()] | ||
assert len(groups) == 2 | ||
return (groups[0], groups[1]) |
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.
return (groups[0], groups[1]) | |
return groups[0], groups[1] |
self.commands : Dict[str, GenericCommand] = collections.OrderedDict() | ||
self.functions : Dict[str, GenericFunction] = collections.OrderedDict() | ||
self.missing: Dict[str, Exception] = {} | ||
self.commands : dict[str, GenericCommand] = collections.OrderedDict() |
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.
don't we not need ordered dicts anymore?
@@ -11063,7 +11071,7 @@ def selected_arena(self, value: GlibcArena) -> None: | |||
return | |||
|
|||
@property | |||
def arenas(self) -> Union[List, Iterator[GlibcArena]]: | |||
def arenas(self) -> list | Iterator[GlibcArena]: |
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.
If you want to use |
I think there are many more cases where we can get rid of Union
Description
Follow-up PR for #1133
Cleans up the code to make it more in comformance with Python 3.10 capabilities.