Move imports in recorder component (#27859)

* move imports to top-level in recorder init

* move imports to top-level in recorder migration

* move imports to top-level in recorder models

* move imports to top-level in recorder purge

* move imports to top-level in recorder util

* fix pylint
This commit is contained in:
Malte Franken authored and Paulus Schoutsen committed 2019-10-18 10:14:54 -07:00
1 parent e95b8035ed
commit 83a709b768
6 files changed
+27 -50

No files matched your search

+1 -2
View File
@@ -15,6 +15,7 @@ from sqlalchemy import (
distinct,
)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm.session import Session
import homeassistant.util.dt as dt_util
from homeassistant.core import Context, Event, EventOrigin, State, split_entity_id
@@ -164,8 +165,6 @@ class RecorderRuns(Base): # type: ignore
Specify point_in_time if you want to know which existed at that point
in time inside the run.
"""
from sqlalchemy.orm.session import Session
session = Session.object_session(self)
assert session is not None, "RecorderRuns need to be persisted"