changeset 2187:ccdfdc8183ad

remove py2-style 'object' superclass
author drewp@bigasterisk.com
date Fri, 19 May 2023 21:14:01 -0700
parents 04612ba3fe45
children 9fc653ee7fff
files bin/inputquneo bin/paintserver light9/Effects.py light9/ascoltami/main.py light9/ascoltami/musictime_client.py light9/ascoltami/player.py light9/ascoltami/playlist.py light9/collector/collector_client.py light9/collector/device.py light9/collector/output.py light9/collector/weblisteners.py light9/effect/effecteval.py light9/effect/sequencer/note.py light9/effect/sequencer/sequencer.py light9/effect/settings.py light9/effect/simple_outputs.py light9/effecteval/effect.py light9/effecteval/effectloop.py light9/io/udmx.py light9/metrics.py light9/namespaces.py light9/networking.py light9/observable.py
diffstat 23 files changed, 27 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/bin/inputquneo	Fri May 19 20:55:28 2023 -0700
+++ b/bin/inputquneo	Fri May 19 21:14:01 2023 -0700
@@ -26,7 +26,7 @@
 }
 
 
-class WatchMidi(object):
+class WatchMidi:
 
     def __init__(self, graph):
         self.graph = graph
--- a/bin/paintserver	Fri May 19 20:55:28 2023 -0700
+++ b/bin/paintserver	Fri May 19 21:14:01 2023 -0700
@@ -58,7 +58,7 @@
             self.write(json.dumps({'settings': outSettings.asList()}))
 
 
-class App(object):
+class App:
 
     def __init__(self, show, session):
         self.show = show
--- a/light9/Effects.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/Effects.py	Fri May 19 21:14:01 2023 -0700
@@ -18,7 +18,7 @@
 
 
 @register
-class Strip(object):
+class Strip:
     """list of r,g,b tuples for sending to an LED strip"""
     which = 'L'  # LR means both. W is the wide one
     pixels = []
--- a/light9/ascoltami/main.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/ascoltami/main.py	Fri May 19 21:14:01 2023 -0700
@@ -22,7 +22,7 @@
 reactor = cast(IReactorCore, reactor)
 
 
-class App(object):
+class App:
 
     def __init__(self, graph, show):
         self.graph = graph
--- a/light9/ascoltami/musictime_client.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/ascoltami/musictime_client.py	Fri May 19 21:14:01 2023 -0700
@@ -11,7 +11,7 @@
 log = logging.getLogger()
 
 
-class MusicTime(object):
+class MusicTime:
     """
     fetch times from ascoltami in a background thread; return times
     upon request, adjusted to be more precise with the system clock
--- a/light9/ascoltami/player.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/ascoltami/player.py	Fri May 19 21:14:01 2023 -0700
@@ -11,7 +11,7 @@
 
 
 
-class Player(object):
+class Player:
 
     def __init__(self, autoStopOffset=4, onEOS=None):
         """autoStopOffset is the number of seconds before the end of
--- a/light9/ascoltami/playlist.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/ascoltami/playlist.py	Fri May 19 21:14:01 2023 -0700
@@ -7,7 +7,7 @@
     after the last song in the playlist)."""
 
 
-class Playlist(object):
+class Playlist:
 
     def __init__(self, graph, playlistUri):
         self.graph = graph
--- a/light9/collector/collector_client.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/collector/collector_client.py	Fri May 19 21:14:01 2023 -0700
@@ -11,7 +11,7 @@
 _zmqClient = None
 
 
-class TwistedZmqClient(object):
+class TwistedZmqClient:
 
     def __init__(self, service):
         zf = ZmqFactory()
--- a/light9/collector/device.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/collector/device.py	Fri May 19 21:14:01 2023 -0700
@@ -10,7 +10,7 @@
 log = logging.getLogger('device')
 
 
-class Device(object):
+class Device:
     pass
 
 
--- a/light9/collector/output.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/collector/output.py	Fri May 19 21:14:01 2023 -0700
@@ -13,7 +13,7 @@
 logAllDmx = logging.getLogger('output.allDmx')
 
 
-class Output(object):
+class Output:
     """
     send a binary buffer of values to some output device. Call update
     as often as you want- the result will be sent as soon as possible,
--- a/light9/collector/weblisteners.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/collector/weblisteners.py	Fri May 19 21:14:01 2023 -0700
@@ -20,7 +20,7 @@
         ...
 
 
-class WebListeners(object):
+class WebListeners:
 
     def __init__(self) -> None:
         self.clients: List[Tuple[UiListener, Dict[DeviceUri, Dict[OutputAttr, OutputValue]]]] = []
--- a/light9/effect/effecteval.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/effect/effecteval.py	Fri May 19 21:14:01 2023 -0700
@@ -64,7 +64,7 @@
     return clamp255(int(f * 255))
 
 
-class EffectEval(object):
+class EffectEval:
     """
     runs one effect's code to turn effect attr settings into output
     device settings. No state; suitable for reload().
--- a/light9/effect/sequencer/note.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/effect/sequencer/note.py	Fri May 19 21:14:01 2023 -0700
@@ -20,7 +20,7 @@
     return ret
 
 
-class Note(object):
+class Note:
 
     def __init__(self, graph: SyncedGraph, uri: NoteUri, effectevalModule, simpleOutputs, timed=True):
         g = self.graph = graph
--- a/light9/effect/sequencer/sequencer.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/effect/sequencer/sequencer.py	Fri May 19 21:14:01 2023 -0700
@@ -32,7 +32,7 @@
     pass
 
 
-class CodeWatcher(object):
+class CodeWatcher:
 
     def __init__(self, onChange):
         self.onChange = onChange
@@ -54,7 +54,7 @@
         reactor.callLater(.1, go) # type: ignore
 
 
-class Sequencer(object):
+class Sequencer:
     """Notes from the graph + current song playback -> sendToCollector"""
     def __init__(self,
                  graph: SyncedGraph,
--- a/light9/effect/settings.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/effect/settings.py	Fri May 19 21:14:01 2023 -0700
@@ -36,7 +36,7 @@
     return ret
 
 
-class _Settings(object):
+class _Settings:
     """
     default values are 0 or '#000000'. Internal rep must not store zeros or some
     comparisons will break.
--- a/light9/effect/simple_outputs.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/effect/simple_outputs.py	Fri May 19 21:14:01 2023 -0700
@@ -5,7 +5,7 @@
 from rdflib import URIRef
 
 
-class SimpleOutputs(object):
+class SimpleOutputs:
     """
     Watches graph for effects that are just fading output attrs. 
     Call `values` to get (dev,attr):value settings.
--- a/light9/effecteval/effect.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/effecteval/effect.py	Fri May 19 21:14:01 2023 -0700
@@ -15,7 +15,7 @@
     pass
 
 
-class CodeLine(object):
+class CodeLine:
     """code string is immutable"""
 
     def __init__(self, graph, code):
@@ -102,7 +102,7 @@
         return out
 
 
-class EffectNode(object):
+class EffectNode:
 
     def __init__(self, graph, uri):
         self.graph, self.uri = graph, uri
--- a/light9/effecteval/effectloop.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/effecteval/effectloop.py	Fri May 19 21:14:01 2023 -0700
@@ -19,7 +19,7 @@
 log = logging.getLogger('effectloop')
 
 
-class EffectLoop(object):
+class EffectLoop:
     """maintains a collection of the current EffectNodes, gets time from
     music player, sends dmx"""
 
@@ -193,7 +193,7 @@
 Z = numpy.zeros((50, 3), dtype=numpy.float16)
 
 
-class ControlBoard(object):
+class ControlBoard:
 
     def __init__(
             self,
--- a/light9/io/udmx.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/io/udmx.py	Fri May 19 21:14:01 2023 -0700
@@ -22,7 +22,7 @@
 cmd_SetChannelRange = 0x0002
 
 
-class Udmx(object):
+class Udmx:
 
     def __init__(self, bus):
         self.dev = None
--- a/light9/metrics.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/metrics.py	Fri May 19 21:14:01 2023 -0700
@@ -101,7 +101,7 @@
 
 metrics consumer side can do this with the changing counts:
 
-class RecentFps(object):
+class RecentFps:
   def __init__(self, window=20):
     self.window = window
     self.recentTimes = []
--- a/light9/namespaces.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/namespaces.py	Fri May 19 21:14:01 2023 -0700
@@ -3,7 +3,7 @@
 
 
 # Namespace was showing up in profiles
-class FastNs(object):
+class FastNs:
 
     def __init__(self, base):
         self.ns = Namespace(base)
--- a/light9/networking.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/networking.py	Fri May 19 21:14:01 2023 -0700
@@ -6,7 +6,7 @@
 from .namespaces import L9
 
 
-class ServiceAddress(object):
+class ServiceAddress:
 
     def __init__(self, service):
         self.service = service
--- a/light9/observable.py	Fri May 19 20:55:28 2023 -0700
+++ b/light9/observable.py	Fri May 19 21:14:01 2023 -0700
@@ -2,11 +2,11 @@
 log = logging.getLogger('observable')
 
 
-class _NoNewVal(object):
+class _NoNewVal:
     pass
 
 
-class Observable(object):
+class Observable:
     """
     like knockout's observable. Hopefully this can be replaced by a
     better python one