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

add fix for import tracker compatibility with py3.11 #75

Merged
merged 4 commits into from
Feb 19, 2024

Conversation

Fred-Fan
Copy link
Contributor

#74

Copy link
Collaborator

@gabe-l-hart gabe-l-hart left a comment

Choose a reason for hiding this comment

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

Small code-golf improvement request. Also, it looks like you need to rebase with signoff:

remote=<remote name for maineline repo>
git fetch $remote
git rebase $remote/main --signoff
git push -f

@@ -322,9 +322,10 @@ def _get_value_col(dis_line: str) -> str:
def _get_op_number(dis_line: str) -> Optional[int]:
"""Get the opcode number out of the line of `dis` output"""
line_parts = dis_line.split()
if not line_parts:
temp = [i for i, val in enumerate(line_parts) if val.isupper()]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Slight tightness suggestion (can't apply as a real suggestion over deleted lines I guess?)

    if not (valid_line_part_idxs := [i for i, val in enumerate(line_parts) if val.isupper()]):
        return None
    opcode_idx = min(valid_line_parts)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. Thanks.

Xuancheng Fan added 2 commits February 19, 2024 10:39
Signed-off-by: Xuancheng Fan <[email protected]>
Signed-off-by: Xuancheng Fan <[email protected]>
Copy link
Collaborator

@gabe-l-hart gabe-l-hart left a comment

Choose a reason for hiding this comment

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

Let's try this

import_tracker/import_tracker.py Outdated Show resolved Hide resolved
3.7 compatible without walrus operator

Signed-off-by: Gabe Goodhart <[email protected]>
Copy link
Collaborator

@gabe-l-hart gabe-l-hart left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@gabe-l-hart gabe-l-hart merged commit 2c1eaff into IBM:main Feb 19, 2024
5 checks passed
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