mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Make sure that get_changed_files returns a dict
This commit is contained in:
@@ -50,15 +50,15 @@ class Refactoring(object):
|
|||||||
return p
|
return p
|
||||||
|
|
||||||
renames = self.get_renames()
|
renames = self.get_renames()
|
||||||
return [
|
return {
|
||||||
ChangedFile(
|
path: ChangedFile(
|
||||||
self._grammar,
|
self._grammar,
|
||||||
from_path=path,
|
from_path=path,
|
||||||
to_path=calculate_to_path(path),
|
to_path=calculate_to_path(path),
|
||||||
module_node=next(iter(map_)).get_root_node(),
|
module_node=next(iter(map_)).get_root_node(),
|
||||||
node_to_str_map=map_
|
node_to_str_map=map_
|
||||||
) for path, map_ in self._file_to_node_changes.items()
|
) for path, map_ in self._file_to_node_changes.items()
|
||||||
]
|
}
|
||||||
|
|
||||||
def get_renames(self):
|
def get_renames(self):
|
||||||
"""
|
"""
|
||||||
@@ -73,7 +73,7 @@ class Refactoring(object):
|
|||||||
for from_, to in self.get_renames():
|
for from_, to in self.get_renames():
|
||||||
text += 'rename from %s\nrename to %s\n' % (from_, to)
|
text += 'rename from %s\nrename to %s\n' % (from_, to)
|
||||||
|
|
||||||
return text + ''.join(f.get_diff() for f in self.get_changed_files())
|
return text + ''.join(f.get_diff() for f in self.get_changed_files().values())
|
||||||
|
|
||||||
def apply(self):
|
def apply(self):
|
||||||
for f in self.get_changed_files():
|
for f in self.get_changed_files():
|
||||||
|
|||||||
Reference in New Issue
Block a user