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

Extract of incomplete block is allowed to half-execute #734

Closed
raymyers opened this issue Dec 15, 2023 · 0 comments · Fixed by #735
Closed

Extract of incomplete block is allowed to half-execute #734

raymyers opened this issue Dec 15, 2023 · 0 comments · Fixed by #735
Labels
bug Unexpected or incorrect user-visible behavior
Milestone

Comments

@raymyers
Copy link
Contributor

Describe the bug
Currently Rope will allow an extract to partially execute that includes the statement that begins an indented block but not the last statement in the block.

To Reproduce
Steps to reproduce the behavior:

  1. Code before refactoring:
if True:
   a = 1
   b = 2
  1. Describe the refactoring you want to do

Extract function of the region marked in comments

# start {{
if True:
   a = 1 # }} end
   b = 2
  1. Expected code after refactoring:

No change, exception raised

  1. Describe the error or unexpected result that you are getting

No exception raised, creates a new function but does not replace the target region with a call to it.

Editor information (please complete the following information):

  • Rope Python version: 3.10
  • Rope version: Rope 1.10
@raymyers raymyers added the bug Unexpected or incorrect user-visible behavior label Dec 15, 2023
@lieryan lieryan added this to the 1.12.0 milestone Jan 18, 2024
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.

2 participants