From 6c2fb720f20e325f6dcbdcea5d6ec9031060a237 Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Sun, 27 Mar 2022 11:33:01 +0100 Subject: [PATCH] reformat long arrays fix long multi line arrays created by black --- vbancmd/kinds.py | 12 +--- vbancmd/meta.py | 160 ++++----------------------------------------- vbancmd/vbancmd.py | 31 ++------- 3 files changed, 22 insertions(+), 181 deletions(-) diff --git a/vbancmd/kinds.py b/vbancmd/kinds.py index e11e67c..a9e56ab 100644 --- a/vbancmd/kinds.py +++ b/vbancmd/kinds.py @@ -11,19 +11,13 @@ VMKind = namedtuple("VMKind", ["id", "name", "ins", "outs", "executable", "vban" bits = 64 if sys.maxsize > 2**32 else 32 os = platform.system() - +# fmt: off _kind_map = { "basic": VMKind("basic", "Basic", (2, 1), (1, 1), "voicemeeter.exe", (4, 4)), "banana": VMKind("banana", "Banana", (3, 2), (3, 2), "voicemeeterpro.exe", (8, 8)), - "potato": VMKind( - "potato", - "Potato", - (5, 3), - (5, 3), - f'voicemeeter8{"x64" if bits == 64 else ""}.exe', - (8, 8), - ), + "potato": VMKind("potato", "Potato", (5, 3), (5, 3), f'voicemeeter8{"x64" if bits == 64 else ""}.exe', (8, 8),), } +# fmt: on def get(kind_id): diff --git a/vbancmd/meta.py b/vbancmd/meta.py index 4415b67..6228429 100644 --- a/vbancmd/meta.py +++ b/vbancmd/meta.py @@ -73,177 +73,45 @@ def strip_output_prop(param): def bus_mode_prop(param): """A bus mode prop.""" - + # fmt: off def fget(self): data = self.public_packet modes = { "normal": ( - False, - False, - False, - False, - False, - False, - False, - False, - False, - False, - False, - False, + False, False, False, False, False, False, False, False, False, False, False, False, ), "amix": ( - False, - True, - False, - True, - False, - True, - False, - True, - False, - True, - False, - True, + False, True, False, True, False, True, False, True, False, True, False, True, ), "repeat": ( - False, - False, - True, - True, - False, - False, - True, - True, - False, - False, - True, - True, + False, False, True, True, False, False, True, True, False, False, True, True, ), "bmix": ( - False, - True, - True, - True, - False, - True, - True, - True, - False, - True, - True, - True, + False, True, True, True, False, True, True, True, False, True, True, True, ), "composite": ( - False, - False, - False, - False, - True, - True, - True, - True, - False, - False, - False, - False, + False, False, False, False, True, True, True, True, False, False, False, False, ), "tvmix": ( - False, - True, - False, - True, - True, - True, - True, - True, - False, - True, - False, - True, + False, True, False, True, True, True, True, True, False, True, False, True, ), "upmix21": ( - False, - False, - True, - True, - True, - True, - True, - True, - False, - False, - True, - True, + False, False, True, True, True, True, True, True, False, False, True, True, ), "upmix41": ( - False, - True, - True, - True, - True, - True, - True, - True, - False, - True, - True, - True, + False, True, True, True, True, True, True, True, False, True, True, True, ), "upmix61": ( - False, - False, - False, - False, - False, - False, - False, - False, - True, - True, - True, - True, + False, False, False, False, False, False, False, False, True, True, True, True, ), "centeronly": ( - False, - True, - False, - True, - False, - True, - False, - True, - True, - True, - True, - True, + False, True, False, True, False, True, False, True, True, True, True, True, ), "lfeonly": ( - False, - False, - True, - True, - False, - False, - True, - True, - True, - True, - True, - True, + False, False, True, True, False, False, True, True, True, True, True, True, ), "rearonly": ( - False, - True, - True, - True, - False, - True, - True, - True, - True, - True, - True, - True, + False, True, True, True, False, True, True, True, True, True, True, True, ), } vals = tuple( @@ -256,7 +124,7 @@ def bus_mode_prop(param): self._remote.cache[f"{self.identifier}.mode.{param}"] = [val, False] return val return val == 1 - + # fmt: on def fset(self, val): if not isinstance(val, bool) and val not in (0, 1): raise VMCMDErrors(f"mode.{param} is a boolean parameter") diff --git a/vbancmd/vbancmd.py b/vbancmd/vbancmd.py index 968e4f6..3a3cec2 100644 --- a/vbancmd/vbancmd.py +++ b/vbancmd/vbancmd.py @@ -29,34 +29,13 @@ class VbanCmd(abc.ABC): self._channel = kwargs["channel"] self._delay = kwargs["delay"] self._ratelimiter = kwargs["ratelimiter"] + # fmt: off self._bps_opts = [ - 0, - 110, - 150, - 300, - 600, - 1200, - 2400, - 4800, - 9600, - 14400, - 19200, - 31250, - 38400, - 57600, - 115200, - 128000, - 230400, - 250000, - 256000, - 460800, - 921600, - 1000000, - 1500000, - 2000000, - 3000000, + 0, 110, 150, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 31250, + 38400, 57600, 115200, 128000, 230400, 250000, 256000, 460800, 921600, + 1000000, 1500000, 2000000, 3000000, ] - + # fmt: on if self._channel not in range(256): raise VMCMDErrors("Channel must be in range 0 to 255") self._text_header = TextRequestHeader(