Anonymous avatar Anonymous committed b4b0707

pycore: using project.prefs instead of get_prefs()

Comments (0)

Files changed (1)

rope/base/pycore.py

 
     @property
     def automatic_soa(self):
-        auto_soa = self.project.get_prefs().get('automatic_soi', None)
-        return self.project.get_prefs().get('automatic_soa', auto_soa)
+        auto_soa = self.project.prefs.get('automatic_soi', None)
+        return self.project.prefs.get('automatic_soa', auto_soa)
 
     def _file_changed_for_soa(self, resource, new_resource=None):
         old_contents = self.project.history.\
         controlling the process.
 
         """
-        perform_doa = self.project.get_prefs().get('perform_doi', True)
-        perform_doa = self.project.get_prefs().get('perform_doa', perform_doa)
+        perform_doa = self.project.prefs.get('perform_doi', True)
+        perform_doa = self.project.prefs.get('perform_doa', perform_doa)
         receiver = self.object_info.doa_data_received
         if not perform_doa:
             receiver = None
 class _ExtensionCache(object):
 
     def __init__(self, pycore):
+        self.project = pycore.project
         self.extensions = {}
-        self.allowed = pycore.project.get_prefs().get('extension_modules', [])
 
     def get_pymodule(self, name):
         if name == '__builtin__':
             self.extensions[name] = builtins.BuiltinModule(name)
         return self.extensions.get(name)
 
+    @property
+    def allowed(self):
+        return self.project.prefs.get('extension_modules', [])
+
 
 class _ClassesCache(object):
 
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.