mirror of
https://github.com/elisspace/core.git
synced 2026-10-01 14:59:53 +00:00
Sort imports according to PEP8 for recorder (#29652)
This commit is contained in:
committed by
Franck Nijhof
parent
b832749e3c
commit
3d64405896
@@ -5,18 +5,19 @@ import concurrent.futures
|
||||
from datetime import datetime, timedelta
|
||||
import logging
|
||||
import queue
|
||||
from sqlite3 import Connection
|
||||
import threading
|
||||
import time
|
||||
from typing import Any, Dict, Optional
|
||||
from sqlite3 import Connection
|
||||
|
||||
import voluptuous as vol
|
||||
from sqlalchemy import exc, create_engine
|
||||
from sqlalchemy import create_engine, exc
|
||||
from sqlalchemy.engine import Engine
|
||||
from sqlalchemy.event import listens_for
|
||||
from sqlalchemy.orm import scoped_session, sessionmaker
|
||||
from sqlalchemy.pool import StaticPool
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import persistent_notification
|
||||
from homeassistant.const import (
|
||||
ATTR_ENTITY_ID,
|
||||
CONF_DOMAINS,
|
||||
@@ -29,7 +30,6 @@ from homeassistant.const import (
|
||||
EVENT_TIME_CHANGED,
|
||||
MATCH_ALL,
|
||||
)
|
||||
from homeassistant.components import persistent_notification
|
||||
from homeassistant.core import CoreState, HomeAssistant, callback
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entityfilter import generate_filter
|
||||
|
||||
@@ -6,7 +6,7 @@ from sqlalchemy import Table, text
|
||||
from sqlalchemy.engine import reflection
|
||||
from sqlalchemy.exc import OperationalError, SQLAlchemyError
|
||||
|
||||
from .models import SchemaChanges, SCHEMA_VERSION, Base
|
||||
from .models import SCHEMA_VERSION, Base, SchemaChanges
|
||||
from .util import session_scope
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Models for SQLAlchemy."""
|
||||
import json
|
||||
from datetime import datetime
|
||||
import json
|
||||
import logging
|
||||
|
||||
from sqlalchemy import (
|
||||
@@ -17,9 +17,9 @@ from sqlalchemy import (
|
||||
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
|
||||
from homeassistant.helpers.json import JSONEncoder
|
||||
import homeassistant.util.dt as dt_util
|
||||
|
||||
# SQLAlchemy Schema
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
@@ -5,8 +5,8 @@ import logging
|
||||
from sqlalchemy.exc import SQLAlchemyError
|
||||
|
||||
import homeassistant.util.dt as dt_util
|
||||
from .models import Events, States
|
||||
|
||||
from .models import Events, States
|
||||
from .util import session_scope
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
Reference in New Issue
Block a user