Skip to content

Commit 23cf7e5

Browse files
committed
Migrate to Rope 0.9.4
1 parent a4b6553 commit 23cf7e5

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

pylibs/rope/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""rope, a python refactoring library"""
22

33
INFO = __doc__
4-
VERSION = '0.9.3'
4+
VERSION = '0.9.4'
55
COPYRIGHT = """\
6-
Copyright (C) 2006-2010 Ali Gholami Rudi
7-
Copyright (C) 2009-2010 Anton Gritsay
6+
Copyright (C) 2006-2012 Ali Gholami Rudi
7+
Copyright (C) 2009-2012 Anton Gritsay
88
99
This program is free software; you can redistribute it and/or modify it
1010
under the terms of GNU General Public License as published by the

pylibs/rope/base/libutils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ def relative(root, path):
3333
root = rope.base.project._realpath(root).replace(os.path.sep, '/')
3434
path = rope.base.project._realpath(path).replace(os.path.sep, '/')
3535
if path == root:
36-
return ''
36+
return ''
3737
if path.startswith(root + '/'):
38-
return path[len(root) + 1:]
38+
return path[len(root) + 1:]
3939

4040
def report_change(project, path, old_content):
4141
"""Report that the contents of file at `path` was changed

pylibs/rope/base/pycore.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,13 @@ def is_python_file(self, resource):
7575

7676
def get_module(self, name, folder=None):
7777
"""Returns a `PyObject` if the module was found."""
78+
# check if this is a builtin module
79+
pymod = self._builtin_module(name)
80+
if pymod is not None:
81+
return pymod
7882
module = self.find_module(name, folder)
7983
if module is None:
80-
module = self._builtin_module(name)
81-
if module is None:
82-
raise ModuleNotFoundError('Module %s not found' % name)
83-
return module
84+
raise ModuleNotFoundError('Module %s not found' % name)
8485
return self.resource_to_pyobject(module)
8586

8687
def _builtin_submodules(self, modname):

0 commit comments

Comments
 (0)