Skip to content

Commit

Permalink
Add some informative pydoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xylix committed Mar 5, 2020
1 parent 9a849ca commit 2a6a8da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 4 additions & 1 deletion aw_qt/config.py
Expand Up @@ -17,7 +17,10 @@
default_config['aw-qt-testing'] = default_settings
qt_config = load_config("aw-qt", default_config)


"""
An instance of loaded settings, containing a list of modules to autostart.
Constructor takes a `testing` boolean as an argument
"""
class AwQtSettings:
def __init__(self, testing: bool):
config_section = qt_config["aw-qt" if not testing else "aw-qt-testing"]
Expand Down
8 changes: 3 additions & 5 deletions aw_qt/manager.py
Expand Up @@ -52,9 +52,7 @@ def _locate_executable(name: str) -> Optional[str]:
return None


"""
Look for modules in given directory path and recursively in subdirs matching aw-*
"""
""" Look for modules in given directory path and recursively in subdirs matching aw-* """
def _discover_modules_in_directory(modules: List[str], search_path: str) -> None:
matches = glob(os.path.join(search_path, "aw-*"))
for match in matches:
Expand All @@ -66,7 +64,7 @@ def _discover_modules_in_directory(modules: List[str], search_path: str) -> None
else:
logger.warning("Found matching file but was not executable: {}".format(match))


""" Use _discover_modules_in_directory to find all bundled modules """
def _discover_modules_bundled() -> List[str]:
modules: List[str] = []
cwd = os.getcwd()
Expand All @@ -78,7 +76,7 @@ def _discover_modules_bundled() -> List[str]:
logger.info("Found no bundles modules")
return modules


""" Find all aw- modules in PATH """
def _discover_modules_system() -> List[str]:
search_paths = os.environ["PATH"].split(":")
modules = []
Expand Down

0 comments on commit 2a6a8da

Please sign in to comment.