Use dict literals (#33658)

This commit is contained in:
springstan 2020-04-04 22:31:56 +02:00 committed by GitHub
parent 541e30d155
commit 0d95eff21d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 33 additions and 33 deletions

View file

@ -11,7 +11,7 @@ _LOGGER = logging.getLogger(__name__)
def initialise_templates(hass, templates, attribute_templates=None):
"""Initialise templates and attribute templates."""
if attribute_templates is None:
attribute_templates = dict()
attribute_templates = {}
for template in chain(templates.values(), attribute_templates.values()):
if template is None:
continue
@ -23,7 +23,7 @@ def extract_entities(
):
"""Extract entity ids from templates and attribute templates."""
if attribute_templates is None:
attribute_templates = dict()
attribute_templates = {}
entity_ids = set()
if manual_entity_ids is None:
invalid_templates = []