PEP8 and PyLint style fixes

pull/2/head
Paulus Schoutsen 2014-03-11 22:49:54 -07:00
parent 75a0498080
commit 7cc9034815
2 changed files with 5 additions and 4 deletions

View File

@ -100,12 +100,13 @@ def setup(bus, statemachine):
casts = {}
eid_form = ENTITY_ID_FORMAT.format
for host in hosts:
try:
cast = pychromecast.PyChromecast(host)
entity_id = ENTITY_ID_FORMAT.format(
util.slugify(cast.device.friendly_name))
entity_id = eid_form(util.slugify(cast.device.friendly_name))
casts[entity_id] = cast

View File

@ -60,8 +60,8 @@ def repr_helper(inp):
""" Helps creating a more readable string representation of objects. """
if isinstance(inp, dict):
return u", ".join(
repr_helper(key)+u"="+repr_helper(item) for key, item in inp.items()
)
repr_helper(key)+u"="+repr_helper(item) for key, item
in inp.items())
elif isinstance(inp, list):
return u'[' + u', '.join(inp) + u']'
elif isinstance(inp, datetime.datetime):