Giter Site home page Giter Site logo

pyrefactor's People

Contributors

dnatag avatar lmno avatar pchomik avatar vkd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pyrefactor's Issues

Exception for Extract Method

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'

Settings to define path to python

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.

Keymap

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:

  • ctrl+shift+z: redo
  • ctrl+shift+n: new_window

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

Extracting Method doesn't work

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]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.