Skip to content

Fail to inline dictionary with inline comment #514

@lieryan

Description

@lieryan

Fail to inlining code with inline comment.

To Reproduce
Steps to reproduce the behavior:

  1. Code before refactoring:
myvar = {
    "key": "value",  # noqa
}
print(myvar)
  1. Describe the refactoring you want to do: Inline "myvar"

  2. Expected code after refactoring:


print({
    "key": "value",  # noqa
})
  1. Describe the error or unexpected result that you are getting
Syntax error in file <tests/test_debug_application_credential.py> line <1>: '{' was never closed

Editor information (please complete the following information):

  • Project Python version: 3.10.6
  • Rope Python version: 3.10.6
  • Rope version: rope==1.4.0
  • Text editor/IDE and version: Vim

Metadata

Metadata

Assignees

Labels

bugUnexpected or incorrect user-visible behaviorinline-refactor

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions