GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — extract all similar expressions/code #220 · sirusdv/pythonVSCode@c78c0f2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • pythonFiles
    • refactor.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎pythonFiles/refactor.py‎

Copy file name to clipboardExpand all lines: pythonFiles/refactor.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def _extractVariable(self, filePath, start, end, newName):
174174
WORKSPACE_ROOT, ropefolder=ROPE_PROJECT_FOLDER, save_history=False)
175175
resourceToRefactor = libutils.path_to_resource(project, filePath)
176176
refactor = ExtractVariableRefactor(
177-
project, resourceToRefactor, startOffset=start, endOffset=end, newName=newName)
177+
project, resourceToRefactor, startOffset=start, endOffset=end, newName=newName, similar=True)
178178
refactor.refactor()
179179
changes = refactor.changes
180180
project.close()
@@ -191,7 +191,7 @@ def _extractMethod(self, filePath, start, end, newName):
191191
WORKSPACE_ROOT, ropefolder=ROPE_PROJECT_FOLDER, save_history=False)
192192
resourceToRefactor = libutils.path_to_resource(project, filePath)
193193
refactor = ExtractMethodRefactor(
194-
project, resourceToRefactor, startOffset=start, endOffset=end, newName=newName)
194+
project, resourceToRefactor, startOffset=start, endOffset=end, newName=newName, similar=True)
195195
refactor.refactor()
196196
changes = refactor.changes
197197
project.close()

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.