Skip to main content

a python refactoring IDE...

Project description

Overview

rope is a python refactoring library and IDE. The IDE uses the library to provide features like refactoring, code assist, and auto-completion. It is written in python. The IDE uses Tkinter library.

Rope IDE and library are released in two separate packages. rope package contains only the library and ropeide package contains the IDE and the library.

New Features

  • Handling imports when inlining

  • Handling recursive restructurings

  • Better diff highlighting

Inline method refactoring can add imports when necessary. For instance consider mod1.py is:

import sys


class C(object):
    pass

def do_something():
    print sys.version
    return C()

and mod2.py is:

import mod1


c = mod1.do_something()

After inlining do_something, mod2.py would be:

import mod1
import sys


print sys.version
c = mod1.C()

Also rope can inline class methods; for instance in:

class C(object):
    @classmethod
    def say_hello(cls, name):
        return 'Saying hello to %s from %s' % (name, cls.__name__)
hello = C.say_hello('Rope')

inlining say_hello will result in:

class C(object):
    pass
hello = 'Saying hello to %s from %s' % ('Rope', C.__name__)

Restructurings can handle recursive patterns like searching for ${?a} // ${?b} in 1 // 2 // 3. Also the diffs in show history and preview changes dialog are highlighted.

Project details


Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page