dnatag / pyrefactor Goto Github PK
View Code? Open in Web Editor NEWPython refactoring tool for Sublime Text
Python refactoring tool for Sublime Text
Hello,
Latest version of the plugin contains error. Because of this error tmp files stays on disk.
Traceback (most recent call last):
File "/home/ute/.config/sublime-text-3/Packages/PyRefactor/refactor.py", line 171, in finish
self.progress_reporter.join()
AttributeError: 'NoneType' object has no attribute 'join'
Hello,
Current plugin version is not able to support python installed in virtualenv. It will be good to introduce plugin settings to be able to configure python path. Now I had to do it manually.
Hi,
First, thanks for providing this nice plugin. It is being very useful.
I'm not sure if you noticed, but it have conflicted with some sublime keymaps:
The idea of overriding the "ctrl+shift+z" could be nice, once it may allow us to roll back a refactor in a single step in a very natural way. But, when there isn't any refactor change in the undo list, it should preserve the standard redo behavior, which is not happening.
The way I turnaround this was changing the keymap as follows:
[
{"keys": ["ctrl+shift+z"], "command": "redo"},
{"keys": ["ctrl+shift+n"], "command": "new_window"},
{"keys": ["ctrl+alt+z"], "command": "refactor_undo"},
{"keys": ["ctrl+alt+y"], "command": "refactor_redo"},
{"keys": ["ctrl+alt+n"], "command": "refactor_create_project"}
]
Best,
Emanuel
I use the function Extract Method, I put the name of my function and press enter and I get that :
Traceback (most recent call last):
File "/home/<username>/stats/gestion/tmpmmq31e", line 12, in <module>
changes = ExtractMethod(myproject, ropy, 34, 37).get_changes('sum', similar=True)
File "/usr/lib/python3.10/site-packages/rope/refactor/extract.py", line 83, in get_changes
new_contents = _ExtractPerformer(info).extract()
File "/usr/lib/python3.10/site-packages/rope/refactor/extract.py", line 285, in __init__
_ExceptionalConditionChecker()(self.info)
File "/usr/lib/python3.10/site-packages/rope/refactor/extract.py", line 439, in __call__
self.base_conditions(info)
File "/usr/lib/python3.10/site-packages/rope/refactor/extract.py", line 451, in base_conditions
raise RefactoringError("Bad region selected for extract method")
rope.base.exceptions.RefactoringError: Bad region selected for extract method
[Refactoring was finished in 0.4s with exit code 1]
Sublime Text 3, build 3103, Linux.
Latest rope installed in the global Python site-packages via pip.
Did I miss some setup instructions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.