use my.config instead of mycfg; minor cleanups and docstrings
This commit is contained in:
parent
f31ff71e6f
commit
9fe5c8e670
37 changed files with 142 additions and 110 deletions
4
my/vk.py
4
my/vk.py
|
@ -2,7 +2,7 @@ from datetime import datetime
|
|||
import json
|
||||
from typing import NamedTuple, Iterator, Dict, Union, Sequence, Optional
|
||||
|
||||
from mycfg import paths
|
||||
from my.config import vk as config
|
||||
|
||||
|
||||
class Favorite(NamedTuple):
|
||||
|
@ -53,7 +53,7 @@ def parse_fav(j: Dict) -> Favorite:
|
|||
|
||||
|
||||
def _iter_favs() -> Iterator[Res]:
|
||||
jj = json.loads(paths.vk.favs_file.read_text())
|
||||
jj = json.loads(config.favs_file.read_text())
|
||||
for j in jj:
|
||||
try:
|
||||
yield parse_fav(j)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue