Skip to content

Commit 2c10ddd

Browse files
Commenting
Making the numpydoc consistent. No longer provide examples, declare attributes, etc.
1 parent 4c26ccd commit 2c10ddd

File tree

3 files changed

+23
-21
lines changed

3 files changed

+23
-21
lines changed

src/navigate/config/config.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ def get_navigate_path():
5454
-------
5555
str
5656
Path to Navigate home directory.
57-
58-
Examples
59-
--------
60-
>>> get_navigate_path()
61-
'C:\\Users\\username\\AppData\\Local\\.navigate'
6257
"""
6358
if platform.system() == "Windows":
6459
base_directory = os.getenv("LOCALAPPDATA")
@@ -170,14 +165,6 @@ def build_nested_dict(manager, parent_dict, key_name, dict_data):
170165
Name of dictionary to insert
171166
dict_data : dict
172167
Dictionary to insert
173-
174-
Returns
175-
-------
176-
None
177-
178-
Examples
179-
--------
180-
>>> build_nested_dict(manager, parent_dict, key_name, dict_data)
181168
"""
182169
if type(dict_data) != dict and type(dict_data) != list:
183170
parent_dict[key_name] = dict_data
@@ -213,10 +200,6 @@ def update_config_dict(manager, parent_dict, config_name, new_config) -> bool:
213200
-------
214201
bool
215202
True or False
216-
217-
Examples
218-
--------
219-
>>> update_config_dict(manager, parent_dict, config_name, new_config)
220203
"""
221204
if type(new_config) != dict and type(new_config) != list:
222205
file_path = str(new_config)
@@ -1096,4 +1079,3 @@ def verify_configuration(manager, configuration):
10961079
"gui",
10971080
{"channels": {"count": channel_count}},
10981081
)
1099-

src/navigate/model/plugins_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
# Third-party imports
3838

3939
# Local application imports
40-
from navigate.tools.file_functions import load_yaml_file, save_yaml_file
40+
from navigate.tools.file_functions import save_yaml_file
4141
from navigate.tools.decorators import FeatureList, AcquisitionMode
4242
from navigate.config.config import get_navigate_path
4343
from navigate.plugins.plugin_manager import PluginFileManager, PluginPackageManager
@@ -102,7 +102,7 @@ def load_plugins_through_manager(self, plugin_manager):
102102
plugin_manager.load_devices(plugin_ref, self.register_device)
103103

104104
def register_device(self, device, module):
105-
"""Regiseter device
105+
"""Register device
106106
107107
Parameters
108108
----------

src/navigate/plugins/plugin_manager.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ def register_features(module):
5858

5959

6060
class PluginPackageManager:
61+
"""Plugin package manager"""
62+
6163
@staticmethod
6264
def get_plugins():
6365
"""Get plugins
@@ -227,7 +229,10 @@ def load_devices(package_name, register_func):
227229
[importlib.resources.files(package_name).joinpath("model/devices")]
228230
):
229231
if is_pkg:
230-
full_module_name = f"{package_name}.model.devices.{module_name}.device_startup_functions"
232+
full_module_name = (
233+
f"{package_name}.model."
234+
f"devices.{module_name}.device_startup_functions"
235+
)
231236
try:
232237
module = importlib.import_module(full_module_name)
233238
except (ImportError, AttributeError):
@@ -236,8 +241,23 @@ def load_devices(package_name, register_func):
236241

237242

238243
class PluginFileManager:
244+
"""Plugin file manager"""
245+
239246
def __init__(self, plugins_path, plugins_config_path):
247+
"""Initialize PluginFileManager
248+
249+
Parameters
250+
----------
251+
plugins_path : str
252+
plugins path
253+
plugins_config_path : str
254+
plugins config path
255+
"""
256+
257+
#: str: plugins path
240258
self.plugins_path = plugins_path
259+
260+
#: str: plugins config path
241261
self.plugins_config_path = plugins_config_path
242262

243263
def get_plugins(self):

0 commit comments

Comments
 (0)