Commits

Anonymous committed 1dad47f

autoimport: renamed get_imports to import_assist

Comments (0)

Files changed (2)

rope/contrib/autoimport.py

     def write(self):
         self.project.data_files.write_data('globalnames', self.names)
 
-    def get_imports(self, starting):
+    def import_assist(self, starting):
         # XXX: breaking if gave up! use generators
         result = []
         for module in self.names:

ropetest/contrib/autoimporttest.py

         super(AutoImportTest, self).tearDown()
 
     def test_simple_case(self):
-        self.assertEquals([], self.importer.get_imports('A'))
+        self.assertEquals([], self.importer.import_assist('A'))
 
     def test_update_resource(self):
         self.mod1.write('myvar = None\n')
         self.importer.update_resource(self.mod1)
         self.assertEquals([('myvar', 'mod1')],
-                          self.importer.get_imports('myva'))
+                          self.importer.import_assist('myva'))
 
     def test_update_module(self):
         self.mod1.write('myvar = None')
         self.importer.update_module('mod1')
         self.assertEquals([('myvar', 'mod1')],
-                          self.importer.get_imports('myva'))
+                          self.importer.import_assist('myva'))
 
     def test_update_non_existent_module(self):
         self.importer.update_module('does_not_exists_this')
-        self.assertEquals([], self.importer.get_imports('myva'))
+        self.assertEquals([], self.importer.import_assist('myva'))
 
     def test_module_with_syntax_errors(self):
         self.mod1.write('this is a syntax error\n')
         self.importer.update_resource(self.mod1)
-        self.assertEquals([], self.importer.get_imports('myva'))
+        self.assertEquals([], self.importer.import_assist('myva'))
 
     def test_excluding_imported_names(self):
         self.mod1.write('import pkg\n')
         self.importer.update_resource(self.mod1)
-        self.assertEquals([], self.importer.get_imports('pkg'))
+        self.assertEquals([], self.importer.import_assist('pkg'))
 
 
 if __name__ == '__main__':
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.