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 committed by karlicoss
parent f31ff71e6f
commit e5b3a1e91e
37 changed files with 142 additions and 110 deletions

View file

@ -1,6 +1,7 @@
"""
Module for [[https://play.google.com/store/apps/details?id=io.github.hidroh.materialistic][Materialistic]] app for Hackernews
[[https://play.google.com/store/apps/details?id=io.github.hidroh.materialistic][Materialistic]] app for Hackernews
"""
from . import init
from datetime import datetime
from typing import Any, Dict, Iterator, NamedTuple
@ -9,7 +10,7 @@ import pytz
import dataset # type: ignore
from .common import get_files
from mycfg import paths
from my.config import materialistic as config
Row = Dict[str, Any]
@ -41,7 +42,7 @@ class Saved(NamedTuple):
def _last_export():
return max(get_files(paths.materialistic.export_path, glob='**/*.db'))
return max(get_files(config.export_path, glob='**/*.db'))
def raw() -> Iterator[Row]: