Path: blob/master/elisp/emacs-for-python/rope-dist/rope/base/default_config.py
1415 views
# The default ``config.py``123def set_prefs(prefs):4"""This function is called before opening the project"""56# Specify which files and folders to ignore in the project.7# Changes to ignored resources are not added to the history and8# VCSs. Also they are not returned in `Project.get_files()`.9# Note that ``?`` and ``*`` match all characters but slashes.10# '*.pyc': matches 'test.pyc' and 'pkg/test.pyc'11# 'mod*.pyc': matches 'test/mod1.pyc' but not 'mod/1.pyc'12# '.svn': matches 'pkg/.svn' and all of its children13# 'build/*.o': matches 'build/lib.o' but not 'build/sub/lib.o'14# 'build//*.o': matches 'build/lib.o' and 'build/sub/lib.o'15prefs['ignored_resources'] = ['*.pyc', '*~', '.ropeproject',16'.hg', '.svn', '_svn', '.git']1718# Specifies which files should be considered python files. It is19# useful when you have scripts inside your project. Only files20# ending with ``.py`` are considered to be python files by21# default.22#prefs['python_files'] = ['*.py']2324# Custom source folders: By default rope searches the project25# for finding source folders (folders that should be searched26# for finding modules). You can add paths to that list. Note27# that rope guesses project source folders correctly most of the28# time; use this if you have any problems.29# The folders should be relative to project root and use '/' for30# separating folders regardless of the platform rope is running on.31# 'src/my_source_folder' for instance.32#prefs.add('source_folders', 'src')3334# You can extend python path for looking up modules35#prefs.add('python_path', '~/python/')3637# Should rope save object information or not.38prefs['save_objectdb'] = True39prefs['compress_objectdb'] = False4041# If `True`, rope analyzes each module when it is being saved.42prefs['automatic_soa'] = True43# The depth of calls to follow in static object analysis44prefs['soa_followed_calls'] = 04546# If `False` when running modules or unit tests "dynamic object47# analysis" is turned off. This makes them much faster.48prefs['perform_doa'] = True4950# Rope can check the validity of its object DB when running.51prefs['validate_objectdb'] = True5253# How many undos to hold?54prefs['max_history_items'] = 325556# Shows whether to save history across sessions.57prefs['save_history'] = True58prefs['compress_history'] = False5960# Set the number spaces used for indenting. According to61# :PEP:`8`, it is best to use 4 spaces. Since most of rope's62# unit-tests use 4 spaces it is more reliable, too.63prefs['indent_size'] = 46465# Builtin and c-extension modules that are allowed to be imported66# and inspected by rope.67prefs['extension_modules'] = []6869# Add all standard c-extensions to extension_modules list.70prefs['import_dynload_stdmods'] = True7172# If `True` modules with syntax errors are considered to be empty.73# The default value is `False`; When `False` syntax errors raise74# `rope.base.exceptions.ModuleSyntaxError` exception.75prefs['ignore_syntax_errors'] = False7677# If `True`, rope ignores unresolvable imports. Otherwise, they78# appear in the importing namespace.79prefs['ignore_bad_imports'] = False808182def project_opened(project):83"""This function is called after opening the project"""84# Do whatever you like here!858687