Skip to content

Rope generates an error when spelling errors in quotes or comments are corrected #338

@rjzupkoii

Description

@rjzupkoii

Issue found when correcting a spelling error in quotes or comments using the Code Spell Checker extension (Version 1.10.2) in Visual Studio Code (Version 1.55.0) and Python extension (Version 2021.3.680753044). This issue may be related to #249 since the error generated is similar.

Reproduction

  1. Create a new Python file
  2. Enter a comment or string with a spelling error:
# Spelling error: vlaue
test = 'Spelling error: vlaue'
  1. Use Code Spell Checker to correct the spelling errors (i.e., select "Value" from the list)
  2. Error appears in lower right corner of screen (see below)

Expected Behavior
Correcting a spelling error in a comment or string should not trigger a notice from Rope.

Error Generated

Refactor failed. Rename refactoring should be performed on resolvable python identifiers. [
<FrameSummary file c:\Users\NAME\.vscode\extensions\ms-python.python-2021.3.680753044\pythonFiles\refactor.py, line 380 in watch>, 
<FrameSummary file c:\Users\NAME\.vscode\extensions\ms-python.python-2021.3.680753044\pythonFiles\refactor.py, line 346 in _process_request>, 
<FrameSummary file c:\Users\NAME\.vscode\extensions\ms-python.python-2021.3.680753044\pythonFiles\refactor.py, line 259 in _rename>, 
<FrameSummary file c:\Users\NAME\.vscode\extensions\ms-python.python-2021.3.680753044\pythonFiles\refactor.py, line 128 in refactor>, 
<FrameSummary file c:\Users\NAME\.vscode\extensions\ms-python.python-2021.3.680753044\pythonFiles\refactor.py, line 155 in onRefactor>, 
<FrameSummary file C:\Users\NAME\AppData\Roaming\Python\Python38\site-packages\rope\refactor\rename.py, line 27 in __init__>]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions