1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 05:26:47 +00:00

Fixes for PEP257 (#11810)

* Fixes for PEP257

* More updates
This commit is contained in:
Fabian Affolter
2018-01-21 07:35:38 +01:00
committed by Paulus Schoutsen
parent 0100f87ff2
commit 47e31dc9ee
143 changed files with 1584 additions and 1761 deletions

View File

@@ -1,21 +1,21 @@
"""Script to run benchmarks."""
import asyncio
import argparse
import asyncio
from contextlib import suppress
from datetime import datetime
import logging
from timeit import default_timer as timer
from homeassistant.const import (
EVENT_TIME_CHANGED, ATTR_NOW, EVENT_STATE_CHANGED)
from homeassistant import core
from homeassistant.const import (
ATTR_NOW, EVENT_STATE_CHANGED, EVENT_TIME_CHANGED)
from homeassistant.util import dt as dt_util
BENCHMARKS = {}
def run(args):
"""Handle ensure config commandline script."""
"""Handle ensure configuration commandline script."""
# Disable logging
logging.getLogger('homeassistant.core').setLevel(logging.CRITICAL)
@@ -44,7 +44,7 @@ def run(args):
def benchmark(func):
"""Decorator to mark a benchmark."""
"""Decorate to mark a benchmark."""
BENCHMARKS[func.__name__] = func
return func