get rid of unnecessary .init imports

This commit is contained in:
Dima Gerasimov 2020-05-06 22:05:16 +01:00
parent 069732600c
commit 9d5d368891
13 changed files with 5 additions and 28 deletions

View file

@ -1,8 +1,6 @@
""" """
[[https://uk.kobobooks.com/products/kobo-aura-one][Kobo]] e-ink reader: annotations and reading stats [[https://uk.kobobooks.com/products/kobo-aura-one][Kobo]] e-ink reader: annotations and reading stats
""" """
from .. import init
from typing import Callable, Union, List from typing import Callable, Union, List
from my.config import kobo as config from my.config import kobo as config

View file

@ -13,7 +13,7 @@ from my.config.holidays_data import HOLIDAYS_DATA
# pip3 install workalendar # pip3 install workalendar
from workalendar.europe import UnitedKingdom # type: ignore from workalendar.europe import UnitedKingdom # type: ignore
cal = UnitedKingdom() # TODO FIXME specify in config cal = UnitedKingdom() # TODO
# TODO that should depend on country/'location' of residence I suppose? # TODO that should depend on country/'location' of residence I suppose?

View file

@ -14,7 +14,7 @@ After that, you can set config attributes:
""" """
# TODO later, If I have config stubs that might be unnecessary too.. # TODO later, If I have config stubs that might be unnecessary too..
from . import init from . import init # todo not sure if this line is necessary? the stub will trigger it anyway
import my.config as config import my.config as config

View file

@ -1,6 +1,4 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from .. import init
from my.config import codeforces as config from my.config import codeforces as config
from datetime import datetime from datetime import datetime

View file

@ -1,9 +1,6 @@
""" """
Github events and their metadata: comments/issues/pull requests Github events and their metadata: comments/issues/pull requests
""" """
from .. import init
from typing import Dict, Any, NamedTuple, Tuple, Optional, Iterator, TypeVar, Set from typing import Dict, Any, NamedTuple, Tuple, Optional, Iterator, TypeVar, Set
from datetime import datetime from datetime import datetime
import json import json

View file

@ -1,6 +1,4 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from .. import init
from my.config import topcoder as config from my.config import topcoder as config
from datetime import datetime from datetime import datetime

View file

@ -1,8 +1,6 @@
""" """
[[https://hypothes.is][Hypothes.is]] highlights and annotations [[https://hypothes.is][Hypothes.is]] highlights and annotations
""" """
from . import init
from .common import get_files from .common import get_files
from .error import Res, sort_res_by from .error import Res, sort_res_by

View file

@ -1,8 +1,6 @@
""" """
[[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 datetime import datetime
from typing import Any, Dict, Iterator, NamedTuple from typing import Any, Dict, Iterator, NamedTuple

View file

@ -1,7 +1,4 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from .. import init
import csv import csv
import json import json
from datetime import datetime from datetime import datetime

View file

@ -2,9 +2,6 @@
''' '''
PDF documents and annotations on your filesystem PDF documents and annotations on your filesystem
''' '''
from . import init
from concurrent.futures import ProcessPoolExecutor from concurrent.futures import ProcessPoolExecutor
from datetime import datetime from datetime import datetime
import re import re

View file

@ -1,8 +1,6 @@
""" """
[[https://pinboard.in][Pinboard]] bookmarks [[https://pinboard.in][Pinboard]] bookmarks
""" """
from . import init
from .common import get_files from .common import get_files
from my.config.repos.pinbexport import dal as pinbexport from my.config.repos.pinbexport import dal as pinbexport

View file

@ -2,8 +2,6 @@
Phone calls and SMS messages Phone calls and SMS messages
""" """
# TODO extract SMS as well? I barely use them though.. # TODO extract SMS as well? I barely use them though..
from . import init
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path
from typing import NamedTuple, Iterator, Set from typing import NamedTuple, Iterator, Set

View file

@ -9,10 +9,10 @@ passenv = CI CI_*
setenv = MY_CONFIG = nonexistent setenv = MY_CONFIG = nonexistent
commands = commands =
pip install -e .[testing] pip install -e .[testing]
# TODO ??
# python -m pytest {posargs} # python -m pytest {posargs}
python3 -c 'import my.init; from my.config import stub as config; print(config.key)' # todo these are probably not necessary anymore?
python3 -c 'import my.init; import my.config; import my.config.repos' # shouldn't fail at least python3 -c 'from my.config import stub as config; print(config.key)'
python3 -c 'import my.config; import my.config.repos' # shouldn't fail at least
python3 -m pytest tests/misc.py tests/get_files.py tests/config.py::test_set_repo tests/config.py::test_environment_variable python3 -m pytest tests/misc.py tests/get_files.py tests/config.py::test_set_repo tests/config.py::test_environment_variable
# TODO add; once I figure out porg depdencency?? tests/config.py # TODO add; once I figure out porg depdencency?? tests/config.py
# TODO run demo.py? just make sure with_my is a bit cleverer? # TODO run demo.py? just make sure with_my is a bit cleverer?