reformat long arrays

fix long multi line arrays created by black
This commit is contained in:
onyx-and-iris 2022-03-27 11:33:01 +01:00
parent 2e23a03b32
commit 6c2fb720f2
3 changed files with 22 additions and 181 deletions

View File

@ -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):

View File

@ -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")

View File

@ -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(