rope.base.pycore ================ .. py:module:: rope.base.pycore Classes ------- .. autoapisummary:: rope.base.pycore.PyCore Functions --------- .. autoapisummary:: rope.base.pycore.perform_soa_on_changed_scopes Module Contents --------------- .. py:class:: PyCore(project) .. py:attribute:: project .. py:attribute:: cache_observers :value: [] .. py:attribute:: module_cache .. py:attribute:: extension_cache .. py:attribute:: object_info .. py:property:: automatic_soa .. py:method:: is_python_file(resource) .. py:method:: get_module(name, folder=None) Returns a `PyObject` if the module was found. .. py:method:: builtin_module(name) .. py:method:: get_relative_module(name, folder, level) .. py:method:: get_string_module(code, resource=None, force_errors=False) Returns a `PyObject` object for the given code If `force_errors` is `True`, `exceptions.ModuleSyntaxError` is raised if module has syntax errors. This overrides ``ignore_syntax_errors`` project config. .. py:method:: get_string_scope(code, resource=None) Returns a `Scope` object for the given code .. py:method:: get_python_path_folders() .. py:method:: find_module(modname, folder=None) Returns a resource corresponding to the given module returns None if it can not be found .. py:method:: find_relative_module(modname, folder, level) .. py:method:: get_source_folders() Returns project source folders .. py:method:: resource_to_pyobject(resource, force_errors=False) -> rope.base.pyobjectsdef.PyPackage | rope.base.pyobjectsdef.PyModule .. py:method:: get_python_files() Returns all python files available in the project .. py:method:: run_module(resource, args=None, stdin=None, stdout=None) Run `resource` module Returns a `rope.base.oi.doa.PythonFileRunner` object for controlling the process. .. py:method:: analyze_module(resource, should_analyze=lambda py: True, search_subscopes=lambda py: True, followed_calls=None) Analyze `resource` module for static object inference This function forces rope to analyze this module to collect information about function calls. `should_analyze` is a function that is called with a `PyDefinedObject` argument. If it returns `True` the element is analyzed. If it is `None` or returns `False` the element is not analyzed. `search_subscopes` is like `should_analyze`; The difference is that if it returns `False` the sub-scopes are all ignored. That is it is assumed that `should_analyze` returns `False` for all of its subscopes. `followed_calls` override the value of ``soa_followed_calls`` project config. .. py:method:: get_classes(task_handle=taskhandle.DEFAULT_TASK_HANDLE) .. py:method:: modname(resource) .. py:property:: extension_modules .. py:function:: perform_soa_on_changed_scopes(project, resource, old_contents)