@@ -14,8 +14,16 @@ def set_prefs(prefs):
14
14
# '.svn': matches 'pkg/.svn' and all of its children
15
15
# 'build/*.o': matches 'build/lib.o' but not 'build/sub/lib.o'
16
16
# 'build//*.o': matches 'build/lib.o' and 'build/sub/lib.o'
17
- prefs ['ignored_resources' ] = ['*.pyc' , '*~' , '.ropeproject' ,
18
- '.hg' , '.svn' , '_svn' , '.git' , '.tox' ]
17
+ prefs ["ignored_resources" ] = [
18
+ "*.pyc" ,
19
+ "*~" ,
20
+ ".ropeproject" ,
21
+ ".hg" ,
22
+ ".svn" ,
23
+ "_svn" ,
24
+ ".git" ,
25
+ ".tox" ,
26
+ ]
19
27
20
28
# Specifies which files should be considered python files. It is
21
29
# useful when you have scripts inside your project. Only files
@@ -37,66 +45,66 @@ def set_prefs(prefs):
37
45
# prefs.add('python_path', '~/python/')
38
46
39
47
# Should rope save object information or not.
40
- prefs [' save_objectdb' ] = True
41
- prefs [' compress_objectdb' ] = False
48
+ prefs [" save_objectdb" ] = True
49
+ prefs [" compress_objectdb" ] = False
42
50
43
51
# If `True`, rope analyzes each module when it is being saved.
44
- prefs [' automatic_soa' ] = True
52
+ prefs [" automatic_soa" ] = True
45
53
# The depth of calls to follow in static object analysis
46
- prefs [' soa_followed_calls' ] = 0
54
+ prefs [" soa_followed_calls" ] = 0
47
55
48
56
# If `False` when running modules or unit tests "dynamic object
49
57
# analysis" is turned off. This makes them much faster.
50
- prefs [' perform_doa' ] = True
58
+ prefs [" perform_doa" ] = True
51
59
52
60
# Rope can check the validity of its object DB when running.
53
- prefs [' validate_objectdb' ] = True
61
+ prefs [" validate_objectdb" ] = True
54
62
55
63
# How many undos to hold?
56
- prefs [' max_history_items' ] = 32
64
+ prefs [" max_history_items" ] = 32
57
65
58
66
# Shows whether to save history across sessions.
59
- prefs [' save_history' ] = True
60
- prefs [' compress_history' ] = False
67
+ prefs [" save_history" ] = True
68
+ prefs [" compress_history" ] = False
61
69
62
70
# Set the number spaces used for indenting. According to
63
71
# :PEP:`8`, it is best to use 4 spaces. Since most of rope's
64
72
# unit-tests use 4 spaces it is more reliable, too.
65
- prefs [' indent_size' ] = 4
73
+ prefs [" indent_size" ] = 4
66
74
67
75
# Builtin and c-extension modules that are allowed to be imported
68
76
# and inspected by rope.
69
- prefs [' extension_modules' ] = []
77
+ prefs [" extension_modules" ] = []
70
78
71
79
# Add all standard c-extensions to extension_modules list.
72
- prefs [' import_dynload_stdmods' ] = True
80
+ prefs [" import_dynload_stdmods" ] = True
73
81
74
82
# If `True` modules with syntax errors are considered to be empty.
75
83
# The default value is `False`; When `False` syntax errors raise
76
84
# `rope.base.exceptions.ModuleSyntaxError` exception.
77
- prefs [' ignore_syntax_errors' ] = False
85
+ prefs [" ignore_syntax_errors" ] = False
78
86
79
87
# If `True`, rope ignores unresolvable imports. Otherwise, they
80
88
# appear in the importing namespace.
81
- prefs [' ignore_bad_imports' ] = False
89
+ prefs [" ignore_bad_imports" ] = False
82
90
83
91
# If `True`, rope will insert new module imports as
84
92
# `from <package> import <module>` by default.
85
- prefs [' prefer_module_from_imports' ] = False
93
+ prefs [" prefer_module_from_imports" ] = False
86
94
87
95
# If `True`, rope will transform a comma list of imports into
88
96
# multiple separate import statements when organizing
89
97
# imports.
90
- prefs [' split_imports' ] = False
98
+ prefs [" split_imports" ] = False
91
99
92
100
# If `True`, rope will remove all top-level import statements and
93
101
# reinsert them at the top of the module when making changes.
94
- prefs [' pull_imports_to_top' ] = True
102
+ prefs [" pull_imports_to_top" ] = True
95
103
96
104
# If `True`, rope will sort imports alphabetically by module name instead
97
105
# of alphabetically by import statement, with from imports after normal
98
106
# imports.
99
- prefs [' sort_imports_alphabetically' ] = False
107
+ prefs [" sort_imports_alphabetically" ] = False
100
108
101
109
# Location of implementation of
102
110
# rope.base.oi.type_hinting.interfaces.ITypeHintingFactory In general
@@ -105,8 +113,9 @@ def set_prefs(prefs):
105
113
# listed in module rope.base.oi.type_hinting.providers.interfaces
106
114
# For example, you can add you own providers for Django Models, or disable
107
115
# the search type-hinting in a class hierarchy, etc.
108
- prefs ['type_hinting_factory' ] = (
109
- 'rope.base.oi.type_hinting.factory.default_type_hinting_factory' )
116
+ prefs [
117
+ "type_hinting_factory"
118
+ ] = "rope.base.oi.type_hinting.factory.default_type_hinting_factory"
110
119
111
120
112
121
def project_opened (project ):
0 commit comments