fix .paths imports
This commit is contained in:
parent
3ee2deecae
commit
0415ea2560
5 changed files with 13 additions and 28 deletions
|
@ -1,20 +1,16 @@
|
|||
from functools import lru_cache
|
||||
from pathlib import Path
|
||||
|
||||
from . import paths
|
||||
|
||||
@lru_cache()
|
||||
def pinbexport():
|
||||
from .common import import_file
|
||||
return import_file(Path(paths.pinbexport.repo) / 'model.py')
|
||||
from mycfg.repos.pinbexport import model as pinbexport
|
||||
from mycfg import paths
|
||||
|
||||
# TODO would be nice to make interfaces available for mypy...
|
||||
Bookmark = pinbexport().Bookmark
|
||||
Bookmark = pinbexport.Bookmark
|
||||
|
||||
def get_model():
|
||||
export_dir = Path(paths.pinbexport.export_dir)
|
||||
sources = list(sorted(export_dir.glob('*.json')))
|
||||
model = pinbexport().Model(sources)
|
||||
model = pinbexport.Model(sources)
|
||||
return model
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue