use my.config instead of mycfg; minor cleanups and docstrings

This commit is contained in:
Dima Gerasimov 2020-04-12 00:18:48 +01:00
parent f31ff71e6f
commit 9fe5c8e670
37 changed files with 142 additions and 110 deletions

View file

@ -14,14 +14,14 @@ from typing import Any, Dict, Iterable, NamedTuple, Set
from ..common import mcachew, LazyLogger, get_files
import mycfg
from my.config import bluemaestro as config
logger = LazyLogger('bluemaestro', level='debug')
def _get_exports():
return get_files(mycfg.bluemaestro.export_path, glob='*.db')
return get_files(config.export_path, glob='*.db')
class Measurement(NamedTuple):
@ -29,7 +29,7 @@ class Measurement(NamedTuple):
temp: float
@mcachew(cache_path=mycfg.bluemaestro.cache_path)
@mcachew(cache_path=config.cache_path)
def _iter_measurements(dbs) -> Iterable[Measurement]:
# I guess we can affort keeping them in sorted order
points: Set[Measurement] = set()