Mercurial > personal > weatherlog
annotate .vscode/.ropeproject/config.py @ 21:1ae7bd2566ef
Add a sleep immediately after opening the i2c bus.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sat, 29 Jul 2023 20:33:41 -0400 |
parents | 18dc6245c91a |
children |
rev | line source |
---|---|
0
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
1 # The default ``config.py`` |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
2 # flake8: noqa |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
3 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
4 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
5 def set_prefs(prefs): |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
6 """This function is called before opening the project""" |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
7 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
8 # Specify which files and folders to ignore in the project. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
9 # Changes to ignored resources are not added to the history and |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
10 # VCSs. Also they are not returned in `Project.get_files()`. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
11 # Note that ``?`` and ``*`` match all characters but slashes. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
12 # '*.pyc': matches 'test.pyc' and 'pkg/test.pyc' |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
13 # 'mod*.pyc': matches 'test/mod1.pyc' but not 'mod/1.pyc' |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
14 # '.svn': matches 'pkg/.svn' and all of its children |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
15 # 'build/*.o': matches 'build/lib.o' but not 'build/sub/lib.o' |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
16 # 'build//*.o': matches 'build/lib.o' and 'build/sub/lib.o' |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
17 prefs['ignored_resources'] = ['*.pyc', '*~', '.ropeproject', |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
18 '.hg', '.svn', '_svn', '.git', '.tox'] |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
19 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
20 # Specifies which files should be considered python files. It is |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
21 # useful when you have scripts inside your project. Only files |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
22 # ending with ``.py`` are considered to be python files by |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
23 # default. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
24 #prefs['python_files'] = ['*.py'] |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
25 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
26 # Custom source folders: By default rope searches the project |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
27 # for finding source folders (folders that should be searched |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
28 # for finding modules). You can add paths to that list. Note |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
29 # that rope guesses project source folders correctly most of the |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
30 # time; use this if you have any problems. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
31 # The folders should be relative to project root and use '/' for |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
32 # separating folders regardless of the platform rope is running on. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
33 # 'src/my_source_folder' for instance. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
34 #prefs.add('source_folders', 'src') |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
35 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
36 # You can extend python path for looking up modules |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
37 #prefs.add('python_path', '~/python/') |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
38 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
39 # Should rope save object information or not. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
40 prefs['save_objectdb'] = True |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
41 prefs['compress_objectdb'] = False |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
42 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
43 # If `True`, rope analyzes each module when it is being saved. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
44 prefs['automatic_soa'] = True |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
45 # The depth of calls to follow in static object analysis |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
46 prefs['soa_followed_calls'] = 0 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
47 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
48 # If `False` when running modules or unit tests "dynamic object |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
49 # analysis" is turned off. This makes them much faster. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
50 prefs['perform_doa'] = True |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
51 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
52 # Rope can check the validity of its object DB when running. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
53 prefs['validate_objectdb'] = True |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
54 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
55 # How many undos to hold? |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
56 prefs['max_history_items'] = 32 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
57 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
58 # Shows whether to save history across sessions. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
59 prefs['save_history'] = True |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
60 prefs['compress_history'] = False |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
61 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
62 # Set the number spaces used for indenting. According to |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
63 # :PEP:`8`, it is best to use 4 spaces. Since most of rope's |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
64 # unit-tests use 4 spaces it is more reliable, too. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
65 prefs['indent_size'] = 4 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
66 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
67 # Builtin and c-extension modules that are allowed to be imported |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
68 # and inspected by rope. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
69 prefs['extension_modules'] = [] |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
70 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
71 # Add all standard c-extensions to extension_modules list. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
72 prefs['import_dynload_stdmods'] = True |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
73 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
74 # If `True` modules with syntax errors are considered to be empty. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
75 # The default value is `False`; When `False` syntax errors raise |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
76 # `rope.base.exceptions.ModuleSyntaxError` exception. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
77 prefs['ignore_syntax_errors'] = False |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
78 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
79 # If `True`, rope ignores unresolvable imports. Otherwise, they |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
80 # appear in the importing namespace. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
81 prefs['ignore_bad_imports'] = False |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
82 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
83 # If `True`, rope will insert new module imports as |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
84 # `from <package> import <module>` by default. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
85 prefs['prefer_module_from_imports'] = False |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
86 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
87 # If `True`, rope will transform a comma list of imports into |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
88 # multiple separate import statements when organizing |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
89 # imports. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
90 prefs['split_imports'] = False |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
91 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
92 # If `True`, rope will remove all top-level import statements and |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
93 # reinsert them at the top of the module when making changes. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
94 prefs['pull_imports_to_top'] = True |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
95 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
96 # If `True`, rope will sort imports alphabetically by module name instead of |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
97 # alphabetically by import statement, with from imports after normal |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
98 # imports. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
99 prefs['sort_imports_alphabetically'] = False |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
100 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
101 # Location of implementation of rope.base.oi.type_hinting.interfaces.ITypeHintingFactory |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
102 # In general case, you don't have to change this value, unless you're an rope expert. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
103 # Change this value to inject you own implementations of interfaces |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
104 # listed in module rope.base.oi.type_hinting.providers.interfaces |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
105 # For example, you can add you own providers for Django Models, or disable the search |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
106 # type-hinting in a class hierarchy, etc. |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
107 prefs['type_hinting_factory'] = 'rope.base.oi.type_hinting.factory.default_type_hinting_factory' |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
108 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
109 |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
110 def project_opened(project): |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
111 """This function is called after opening the project""" |
18dc6245c91a
Create initial version of weather sensor reader.
Paul Fisher <paul@pfish.zone>
parents:
diff
changeset
|
112 # Do whatever you like here! |