PEP8 and PyLint style fixes
parent
75a0498080
commit
7cc9034815
|
@ -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
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue