-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Python3 fixes #11231
Python3 fixes #11231
Conversation
Test run: FAILEDSummary: 1 of 4 test jobs failed Failed test jobs:
|
@OPpuolitaival, thank you for your changes. |
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'm not yet familiar with python3 syntax but as far as I can tell this looks ok
@@ -331,7 +331,7 @@ def is_target_supported(cls, target_name): | |||
|
|||
@classmethod | |||
def all_supported_targets(cls): | |||
return [t for t in TARGET_MAP.keys() if cls.is_target_supported(t)] | |||
return [t for t in list(TARGET_MAP) if cls.is_target_supported(t)] |
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.
Should this still be list(TARGET_MAP.keys()) for python2 compatibility?
Just wondering if that works still the same.
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.
@teetak01 "list(TARGET_MAP.keys())" and "list(TARGET_MAP)" output is excatly same in both python versions 3.x and 2.7.x
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.
Reference if you want to read: https://python-future.org/compatible_idioms.html
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.
Looks to fine. Also tested myself a bit between those.
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
Fix some python scripts to work with python 3.x
Pull request type
Reviewers
Release Notes