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

Starred arguments sandwiched between other positional arguments fails to parse #506

Closed
lieryan opened this issue Oct 5, 2022 · 0 comments · Fixed by #507
Closed

Starred arguments sandwiched between other positional arguments fails to parse #506

lieryan opened this issue Oct 5, 2022 · 0 comments · Fixed by #507
Labels
bug Unexpected or incorrect user-visible behavior
Milestone

Comments

@lieryan
Copy link
Member

lieryan commented Oct 5, 2022

Describe the bug

patchedast fails to parse Starred arguments sandwiched between other positional arguments.

To Reproduce
Steps to reproduce the behavior:

  1. Code before refactoring:
a = 10
print(a)

b = 20
print(
    "arg1",
    *b,
    "arg2",
)
  1. Describe the refactoring you want to do: any refactoring, but for example inlining of variable a

  2. Expected code after refactoring:

print(10)

b = 20
print(
    "arg1",
    *b,
    "arg2",
)
  1. Describe the error or unexpected result that you are getting
MismatchedTokenError: Token <,> at (1, 12) cannot be mat

Editor information (please complete the following information):

  • Project Python version: 3.10
  • Rope Python version: 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0]
  • Rope version: 1.3.0
@lieryan lieryan added the bug Unexpected or incorrect user-visible behavior label Oct 5, 2022
@lieryan lieryan added this to the 1.4.0 milestone Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected or incorrect user-visible behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant