diff --git a/bin/inputquneo b/bin/inputquneo --- a/bin/inputquneo +++ b/bin/inputquneo @@ -26,7 +26,7 @@ curves = { } -class WatchMidi(object): +class WatchMidi: def __init__(self, graph): self.graph = graph diff --git a/bin/paintserver b/bin/paintserver --- a/bin/paintserver +++ b/bin/paintserver @@ -58,7 +58,7 @@ class BestMatches(PrettyErrorHandler, cy self.write(json.dumps({'settings': outSettings.asList()})) -class App(object): +class App: def __init__(self, show, session): self.show = show diff --git a/light9/Effects.py b/light9/Effects.py --- a/light9/Effects.py +++ b/light9/Effects.py @@ -18,7 +18,7 @@ def register(f): @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 = [] diff --git a/light9/ascoltami/main.py b/light9/ascoltami/main.py --- a/light9/ascoltami/main.py +++ b/light9/ascoltami/main.py @@ -22,7 +22,7 @@ from light9.ascoltami.webapp import make reactor = cast(IReactorCore, reactor) -class App(object): +class App: def __init__(self, graph, show): self.graph = graph diff --git a/light9/ascoltami/musictime_client.py b/light9/ascoltami/musictime_client.py --- a/light9/ascoltami/musictime_client.py +++ b/light9/ascoltami/musictime_client.py @@ -11,7 +11,7 @@ from light9 import networking 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 diff --git a/light9/ascoltami/player.py b/light9/ascoltami/player.py --- a/light9/ascoltami/player.py +++ b/light9/ascoltami/player.py @@ -11,7 +11,7 @@ log = logging.getLogger() -class Player(object): +class Player: def __init__(self, autoStopOffset=4, onEOS=None): """autoStopOffset is the number of seconds before the end of diff --git a/light9/ascoltami/playlist.py b/light9/ascoltami/playlist.py --- a/light9/ascoltami/playlist.py +++ b/light9/ascoltami/playlist.py @@ -7,7 +7,7 @@ class NoSuchSong(ValueError): after the last song in the playlist).""" -class Playlist(object): +class Playlist: def __init__(self, graph, playlistUri): self.graph = graph diff --git a/light9/collector/collector_client.py b/light9/collector/collector_client.py --- a/light9/collector/collector_client.py +++ b/light9/collector/collector_client.py @@ -11,7 +11,7 @@ log = logging.getLogger('coll_client') _zmqClient = None -class TwistedZmqClient(object): +class TwistedZmqClient: def __init__(self, service): zf = ZmqFactory() diff --git a/light9/collector/device.py b/light9/collector/device.py --- a/light9/collector/device.py +++ b/light9/collector/device.py @@ -10,7 +10,7 @@ from light9.newtypes import VT, DeviceCl log = logging.getLogger('device') -class Device(object): +class Device: pass diff --git a/light9/collector/output.py b/light9/collector/output.py --- a/light9/collector/output.py +++ b/light9/collector/output.py @@ -13,7 +13,7 @@ log = logging.getLogger('output') 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, diff --git a/light9/collector/weblisteners.py b/light9/collector/weblisteners.py --- a/light9/collector/weblisteners.py +++ b/light9/collector/weblisteners.py @@ -20,7 +20,7 @@ class UiListener(Protocol): ... -class WebListeners(object): +class WebListeners: def __init__(self) -> None: self.clients: List[Tuple[UiListener, Dict[DeviceUri, Dict[OutputAttr, OutputValue]]]] = [] diff --git a/light9/effect/effecteval.py b/light9/effect/effecteval.py --- a/light9/effect/effecteval.py +++ b/light9/effect/effecteval.py @@ -64,7 +64,7 @@ def _8bit(f): 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(). diff --git a/light9/effect/sequencer/note.py b/light9/effect/sequencer/note.py --- a/light9/effect/sequencer/note.py +++ b/light9/effect/sequencer/note.py @@ -20,7 +20,7 @@ def pyType(n): return ret -class Note(object): +class Note: def __init__(self, graph: SyncedGraph, uri: NoteUri, effectevalModule, simpleOutputs, timed=True): g = self.graph = graph diff --git a/light9/effect/sequencer/sequencer.py b/light9/effect/sequencer/sequencer.py --- a/light9/effect/sequencer/sequencer.py +++ b/light9/effect/sequencer/sequencer.py @@ -32,7 +32,7 @@ class StateUpdate(All): pass -class CodeWatcher(object): +class CodeWatcher: def __init__(self, onChange): self.onChange = onChange @@ -54,7 +54,7 @@ class CodeWatcher(object): reactor.callLater(.1, go) # type: ignore -class Sequencer(object): +class Sequencer: """Notes from the graph + current song playback -> sendToCollector""" def __init__(self, graph: SyncedGraph, diff --git a/light9/effect/settings.py b/light9/effect/settings.py --- a/light9/effect/settings.py +++ b/light9/effect/settings.py @@ -36,7 +36,7 @@ def getVal(graph, subj): return ret -class _Settings(object): +class _Settings: """ default values are 0 or '#000000'. Internal rep must not store zeros or some comparisons will break. diff --git a/light9/effect/simple_outputs.py b/light9/effect/simple_outputs.py --- a/light9/effect/simple_outputs.py +++ b/light9/effect/simple_outputs.py @@ -5,7 +5,7 @@ from typing import Dict, List, Tuple, An 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. diff --git a/light9/effecteval/effect.py b/light9/effecteval/effect.py --- a/light9/effecteval/effect.py +++ b/light9/effecteval/effect.py @@ -15,7 +15,7 @@ class CouldNotConvert(TypeError): pass -class CodeLine(object): +class CodeLine: """code string is immutable""" def __init__(self, graph, code): @@ -102,7 +102,7 @@ class CodeLine(object): return out -class EffectNode(object): +class EffectNode: def __init__(self, graph, uri): self.graph, self.uri = graph, uri diff --git a/light9/effecteval/effectloop.py b/light9/effecteval/effectloop.py --- a/light9/effecteval/effectloop.py +++ b/light9/effecteval/effectloop.py @@ -19,7 +19,7 @@ from light9.metrics import metrics 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 @@ class EffectLoop(object): Z = numpy.zeros((50, 3), dtype=numpy.float16) -class ControlBoard(object): +class ControlBoard: def __init__( self, diff --git a/light9/io/udmx.py b/light9/io/udmx.py --- a/light9/io/udmx.py +++ b/light9/io/udmx.py @@ -22,7 +22,7 @@ or https://github.com/markusb/uDMX-linux cmd_SetChannelRange = 0x0002 -class Udmx(object): +class Udmx: def __init__(self, bus): self.dev = None diff --git a/light9/metrics.py b/light9/metrics.py --- a/light9/metrics.py +++ b/light9/metrics.py @@ -101,7 +101,7 @@ class PmfStat(Stat): 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 = [] diff --git a/light9/namespaces.py b/light9/namespaces.py --- a/light9/namespaces.py +++ b/light9/namespaces.py @@ -3,7 +3,7 @@ from typing import Dict # Namespace was showing up in profiles -class FastNs(object): +class FastNs: def __init__(self, base): self.ns = Namespace(base) diff --git a/light9/networking.py b/light9/networking.py --- a/light9/networking.py +++ b/light9/networking.py @@ -6,7 +6,7 @@ from .showconfig import getGraph, showUr from .namespaces import L9 -class ServiceAddress(object): +class ServiceAddress: def __init__(self, service): self.service = service diff --git a/light9/observable.py b/light9/observable.py --- a/light9/observable.py +++ b/light9/observable.py @@ -2,11 +2,11 @@ import logging 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