diff --git a/docs/configuration.rst b/docs/configuration.rst index 0a1e630d..a044a55d 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -72,7 +72,9 @@ autoimport.* Options Old Configuration File ---------------------- -This is a sample config.py. While this config.py works and all options here should be supported, the above documentation reflects the latest version of rope. +This is a sample config.py. While this config.py works and all options here +should be supported, the above documentation reflects the recommended way to +do configuration in the latest version of rope. .. literalinclude:: default_config.py :language: python3 diff --git a/rope/base/prefs.py b/rope/base/prefs.py index 2e698eba..cac0b7f1 100644 --- a/rope/base/prefs.py +++ b/rope/base/prefs.py @@ -58,13 +58,13 @@ class Prefs: description=dedent(""" Specify which files and folders to ignore in the project. Changes to ignored resources are not added to the history and - VCSs. Also they are not returned in `Project.get_files()`. + VCSs. Also they are not returned in ``Project.get_files()``. Note that ``?`` and ``*`` match all characters but slashes. - '*.pyc': matches 'test.pyc' and 'pkg/test.pyc' - 'mod*.pyc': matches 'test/mod1.pyc' but not 'mod/1.pyc' - '.svn': matches 'pkg/.svn' and all of its children - 'build/*.o': matches 'build/lib.o' but not 'build/sub/lib.o' - 'build//*.o': matches 'build/lib.o' and 'build/sub/lib.o' + ``*.pyc``: matches ``test.pyc`` and ``pkg/test.pyc`` + ``mod*.pyc``: matches ``test/mod1.pyc`` but not ``mod/1.pyc`` + ``.svn``: matches ``pkg/.svn`` and all of its children + ``build/*.o``: matches ``build/lib.o`` but not ``build/sub/lib.o`` + ``build//*.o``: matches ``build/lib.o`` and ``build/sub/lib.o`` """), ) python_files: List[str] = field( @@ -83,9 +83,9 @@ class Prefs: for finding modules). You can add paths to that list. Note that rope guesses project source folders correctly most of the time; use this if you have any problems. - The folders should be relative to project root and use '/' for + The folders should be relative to project root and use ``/`` for separating folders regardless of the platform rope is running on. - 'src/my_source_folder' for instance. + ``src/my_source_folder`` for instance. """), default_factory=lambda: [], ) @@ -98,10 +98,10 @@ class Prefs: ) compress_objectdb: bool = field( default=False, - description="Deprecated. This has no effect", + description="**Deprecated**. This has no effect", ) automatic_soa: bool = field( - True, "If `True`, rope analyzes each module when it is being saved." + True, "If ``True``, rope analyzes each module when it is being saved." ) soa_followed_calls: int = field( default=0, description="The depth of calls to follow in static object analysis" @@ -109,8 +109,8 @@ class Prefs: perform_doa: bool = field( default=True, description=dedent(""" - If `False` when running modules or unit tests 'dynamic object analysis' is turned off. - This makes them much faster. + If ``False`` when running modules or unit tests 'dynamic object + analysis' is turned off. This makes them much faster. """), ) validate_objectdb: bool = field( @@ -124,7 +124,7 @@ class Prefs: ) compress_history: bool = field( default=False, - description="Deprecated. This has no effect", + description="**Deprecated**. This has no effect", ) indent_size: int = field( @@ -145,35 +145,36 @@ class Prefs: import_dynload_stdmods: bool = field( default=True, - description="Add all standard c-extensions to extension_modules list.", + description="Add all standard c-extensions to ``extension_modules`` list.", ) ignore_syntax_errors: bool = field( default=False, description=dedent(""" - If `True` modules with syntax errors are considered to be empty. - The default value is `False`; When `False` syntax errors raise - `rope.base.exceptions.ModuleSyntaxError` exception. + If ``True`` modules with syntax errors are considered to be empty. + The default value is ``False``; When ``False`` syntax errors raise + ``rope.base.exceptions.ModuleSyntaxError`` exception. """), ) ignore_bad_imports: bool = field( default=False, description=dedent(""" - If `True`, rope ignores unresolvable imports. Otherwise, they + If ``True``, rope ignores unresolvable imports. Otherwise, they appear in the importing namespace. """), ) prefer_module_from_imports: bool = field( default=False, description=dedent(""" - If `True`, rope will insert new module imports as `from import `by default. + If ``True``, rope will insert new module imports as ``from + import `` by default. """), ) split_imports: bool = field( default=False, description=dedent(""" - If `True`, rope will transform a comma list of imports into + If ``True``, rope will transform a comma list of imports into multiple separate import statements when organizing imports. """), @@ -182,7 +183,7 @@ class Prefs: pull_imports_to_top: bool = field( default=True, description=dedent(""" - If `True`, rope will remove all top-level import statements and + If ``True``, rope will remove all top-level import statements and reinsert them at the top of the module when making changes. """), ) @@ -190,7 +191,7 @@ class Prefs: sort_imports_alphabetically: bool = field( default=False, description=dedent(""" - If `True`, rope will sort imports alphabetically by module name instead + If ``True``, rope will sort imports alphabetically by module name instead of alphabetically by import statement, with from imports after normal imports. """), @@ -199,12 +200,15 @@ class Prefs: "rope.base.oi.type_hinting.factory.default_type_hinting_factory", description=dedent(""" Location of implementation of - rope.base.oi.type_hinting.interfaces.ITypeHintingFactory In general - case, you don't have to change this value, unless you're an rope expert. - Change this value to inject you own implementations of interfaces - listed in module rope.base.oi.type_hinting.providers.interfaces - For example, you can add you own providers for Django Models, or disable - the search type-hinting in a class hierarchy, etc. + ``rope.base.oi.type_hinting.interfaces.ITypeHintingFactory`` + + In general case, you don't have to change this value, unless you're + an rope expert. Change this value to inject you own + implementations of interfaces listed in module + ``rope.base.oi.type_hinting.providers.interfaces`` + + For example, you can add you own providers for Django Models, or + disable the search type-hinting in a class hierarchy, etc. """), ) project_opened: Optional[Callable] = field(