fix mypy errors

this fixes two distinct mypy errors

one where NamedTuple/dataclassees can't be
defined locally
https://github.com/python/mypy/issues/7281

which happens when you run mypy like
mypy -p my.core on warm cache

the second error is the core/types.py file shadowing the
stdlib types module
This commit is contained in:
Sean Breckenridge 2021-03-21 22:59:23 -07:00 committed by karlicoss
parent 2bbbff0021
commit 1cdef6f40a
4 changed files with 31 additions and 26 deletions

View file

@ -90,7 +90,7 @@ def entries() -> Iterable[Entry]:
def fill_influxdb() -> None:
from .core.influxdb import magic_fill
from .core.types import Freezer
from .core.freezer import Freezer
freezer = Freezer(Entry)
fit = (freezer.freeze(e) for e in entries())
# TODO crap, influxdb doesn't like None https://github.com/influxdata/influxdb/issues/7722