@@ -163,20 +163,15 @@ def get(self):
163163
164164 description = self .thing .as_thing_description ()
165165 description ["links" ].append (
166- {
167- "rel" : "alternate" ,
168- "href" : "{}{}" .format (ws_href , self .thing .get_href ()),
169- }
166+ {"rel" : "alternate" , "href" : "{}{}" .format (ws_href , self .thing .get_href ()),}
170167 )
171168 description ["base" ] = "{}://{}{}" .format (
172169 self .request .protocol ,
173170 self .request .headers .get ("Host" , "" ),
174171 self .thing .get_href (),
175172 )
176173 description ["securityDefinitions" ] = {
177- "nosec_sc" : {
178- "scheme" : "nosec" ,
179- },
174+ "nosec_sc" : {"scheme" : "nosec" ,},
180175 }
181176 description ["security" ] = "nosec_sc"
182177
@@ -312,9 +307,7 @@ def update_property(self, property_):
312307 message = json .dumps (
313308 {
314309 "messageType" : "propertyStatus" ,
315- "data" : {
316- property_ .name : property_ .get_value (),
317- },
310+ "data" : {property_ .name : property_ .get_value (),},
318311 },
319312 cls = self .json_encoder ,
320313 )
@@ -328,10 +321,7 @@ def update_action(self, action):
328321 :param action: Action
329322 """
330323 message = json .dumps (
331- {
332- "messageType" : "actionStatus" ,
333- "data" : action .as_action_description (),
334- },
324+ {"messageType" : "actionStatus" , "data" : action .as_action_description (),},
335325 cls = self .json_encoder ,
336326 )
337327
@@ -344,10 +334,7 @@ def update_event(self, event):
344334 :param event: Event
345335 """
346336 message = json .dumps (
347- {
348- "messageType" : "event" ,
349- "data" : event .as_event_description (),
350- },
337+ {"messageType" : "event" , "data" : event .as_event_description (),},
351338 cls = self .json_encoder ,
352339 )
353340
@@ -630,19 +617,13 @@ def __init__(
630617
631618 for address in get_addresses ():
632619 self .hosts .extend (
633- [
634- address ,
635- "{}:{}" .format (address , self .port ),
636- ]
620+ [address , "{}:{}" .format (address , self .port ),]
637621 )
638622
639623 if self .hostname is not None :
640624 self .hostname = self .hostname .lower ()
641625 self .hosts .extend (
642- [
643- self .hostname ,
644- "{}:{}" .format (self .hostname , self .port ),
645- ]
626+ [self .hostname , "{}:{}" .format (self .hostname , self .port ),]
646627 )
647628
648629 self .thing .set_href_prefix (self .base_path )
@@ -724,9 +705,7 @@ def start(self):
724705 ]
725706 kwargs = {
726707 "port" : self .port ,
727- "properties" : {
728- "path" : "/" ,
729- },
708+ "properties" : {"path" : "/" ,},
730709 "server" : "{}.local." .format (socket .gethostname ()),
731710 }
732711
0 commit comments