diff bin/effectsequencer @ 1858:7772cc48e016

reformat all python Ignore-this: 1135b78893f8b3d31badddda7f45678f
author drewp@bigasterisk.com
date Tue, 21 May 2019 23:56:12 +0000
parents 8e0e5b3db301
children f066d6e874db
line wrap: on
line diff
--- a/bin/effectsequencer	Tue May 21 23:55:35 2019 +0000
+++ b/bin/effectsequencer	Tue May 21 23:56:12 2019 +0000
@@ -17,7 +17,9 @@
 
 from light9 import clientsession
 
+
 class App(object):
+
     def __init__(self, show, session):
         self.show = show
         self.session = session
@@ -25,23 +27,25 @@
         self.graph = SyncedGraph(networking.rdfdb.url, "effectSequencer")
         self.graph.initiallySynced.addCallback(self.launch)
 
+        self.stats = scales.collection(
+            '/',
+            scales.PmfStat('sendLevels'),
+            scales.PmfStat('getMusic'),
+            scales.PmfStat('evals'),
+            scales.PmfStat('sendOutput'),
+            scales.IntStat('errors'),
+        )
 
-        self.stats = scales.collection('/',
-                                       scales.PmfStat('sendLevels'),
-                                       scales.PmfStat('getMusic'),
-                                       scales.PmfStat('evals'),
-                                       scales.PmfStat('sendOutput'),
-                                       scales.IntStat('errors'),
-                                       )
     def launch(self, *args):
         self.seq = Sequencer(
-            self.graph,
-            lambda settings: sendToCollector('effectSequencer', self.session,
-                                             settings))
+            self.graph, lambda settings: sendToCollector(
+                'effectSequencer', self.session, settings))
 
         self.cycloneApp = cyclone.web.Application(handlers=[
-            (r'/()', cyclone.web.StaticFileHandler,
-             {"path" : "light9/effect/", "default_filename" : "sequencer.html"}),
+            (r'/()', cyclone.web.StaticFileHandler, {
+                "path": "light9/effect/",
+                "default_filename": "sequencer.html"
+            }),
             (r'/updates', Updates),
             (r'/stats', StatsForCyclone),
         ],
@@ -55,12 +59,16 @@
 
 if __name__ == "__main__":
     parser = optparse.OptionParser()
-    parser.add_option('--show',
+    parser.add_option(
+        '--show',
         help='show URI, like http://light9.bigasterisk.com/show/dance2008',
-                      default=showconfig.showUri())
-    parser.add_option("-v", "--verbose", action="store_true",
+        default=showconfig.showUri())
+    parser.add_option("-v",
+                      "--verbose",
+                      action="store_true",
                       help="logging.DEBUG")
-    parser.add_option("--twistedlog", action="store_true",
+    parser.add_option("--twistedlog",
+                      action="store_true",
                       help="twisted logging")
     clientsession.add_option(parser)
     (options, args) = parser.parse_args()
@@ -68,7 +76,7 @@
 
     if not options.show:
         raise ValueError("missing --show http://...")
-        
+
     session = clientsession.getUri('effectSequencer', options)
 
     app = App(URIRef(options.show), session)