From b295fee6e190af2a5a2961ccc3da87a4b21ac045 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 14 Feb 2024 22:06:28 +0000 Subject: [PATCH] lint fixes fix {DCA}.name setter removed unused imports patch bump --- pyproject.toml | 2 +- xair_api/adapter.py | 4 ++-- xair_api/bus.py | 3 +-- xair_api/config.py | 8 ++++---- xair_api/dca.py | 4 +--- xair_api/fx.py | 3 +-- xair_api/lr.py | 5 ++--- xair_api/rtn.py | 15 +-------------- xair_api/shared.py | 8 ++++---- xair_api/strip.py | 15 +-------------- 10 files changed, 18 insertions(+), 49 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9ecb9c9..452a5e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "xair-api" -version = "2.2.4" +version = "2.2.5" description = "Remote control Behringer X-Air | Midas MR mixers through OSC" authors = ["onyx-and-iris "] license = "MIT" diff --git a/xair_api/adapter.py b/xair_api/adapter.py index b4afa0c..0424c82 100644 --- a/xair_api/adapter.py +++ b/xair_api/adapter.py @@ -25,13 +25,13 @@ class FxRtn(IFxRtn): class MainStereo(ILR): @property def address(self) -> str: - return f"/main/st" + return "/main/st" class MainMono(ILR): @property def address(self) -> str: - return f"/main/m" + return "/main/m" class Matrix(ILR): diff --git a/xair_api/bus.py b/xair_api/bus.py index cd8538f..1aec4c6 100644 --- a/xair_api/bus.py +++ b/xair_api/bus.py @@ -1,8 +1,7 @@ import abc -from .errors import XAirRemoteError from .meta import mute_prop -from .shared import EQ, GEQ, Automix, Config, Dyn, Gate, Group, Insert, Mix, Preamp +from .shared import EQ, GEQ, Config, Dyn, Group, Insert, Mix class IBus(abc.ABC): diff --git a/xair_api/config.py b/xair_api/config.py index 2ff99bd..7e6440f 100644 --- a/xair_api/config.py +++ b/xair_api/config.py @@ -33,8 +33,8 @@ class Config(IConfig): Returns a Config class of a kind. """ LINKS_cls = _make_links_mixins[remote.kind.id_] - MUTEGROUP_cls = type(f"MuteGroup", (Config.MuteGroup, cls), {}) - MONITOR_cls = type(f"ConfigMonitor", (Config.Monitor, cls), {}) + MUTEGROUP_cls = type("MuteGroup", (Config.MuteGroup, cls), {}) + MONITOR_cls = type("ConfigMonitor", (Config.Monitor, cls), {}) CONFIG_cls = type( f"Config{remote.kind}", (cls, LINKS_cls), @@ -47,7 +47,7 @@ class Config(IConfig): @property def address(self) -> str: - return f"/config" + return "/config" @property def amixenable(self) -> bool: @@ -105,7 +105,7 @@ class Config(IConfig): @source.setter def source(self, val: int): - self.setter(f"source", val) + self.setter("source", val) @property def sourcetrim(self) -> float: diff --git a/xair_api/dca.py b/xair_api/dca.py index 95d7074..6eca89c 100644 --- a/xair_api/dca.py +++ b/xair_api/dca.py @@ -1,7 +1,5 @@ import abc -from .errors import XAirRemoteError - class IDCA(abc.ABC): """Abstract Base Class for DCA groups""" @@ -50,7 +48,7 @@ class DCA(IDCA): @name.setter def name(self, val: str): - self.setter("config/name")[0] + self.setter("config/name", val) @property def color(self) -> int: diff --git a/xair_api/fx.py b/xair_api/fx.py index d597657..62705e9 100644 --- a/xair_api/fx.py +++ b/xair_api/fx.py @@ -1,8 +1,7 @@ import abc -from .errors import XAirRemoteError from .meta import mute_prop -from .shared import EQ, GEQ, Automix, Config, Dyn, Gate, Group, Insert, Mix, Preamp +from .shared import Config, Group, Mix class IFX(abc.ABC): diff --git a/xair_api/lr.py b/xair_api/lr.py index 88fa2aa..0c7d314 100644 --- a/xair_api/lr.py +++ b/xair_api/lr.py @@ -1,9 +1,8 @@ import abc from typing import Optional -from .errors import XAirRemoteError from .meta import mute_prop -from .shared import EQ, GEQ, Automix, Config, Dyn, Gate, Group, Insert, Mix, Preamp +from .shared import EQ, GEQ, Config, Dyn, Insert, Mix class ILR(abc.ABC): @@ -61,4 +60,4 @@ class LR(ILR): @property def address(self) -> str: - return f"/lr" + return "/lr" diff --git a/xair_api/rtn.py b/xair_api/rtn.py index 205e731..873a6be 100644 --- a/xair_api/rtn.py +++ b/xair_api/rtn.py @@ -1,21 +1,8 @@ import abc from typing import Optional -from .errors import XAirRemoteError from .meta import mute_prop -from .shared import ( - EQ, - GEQ, - Automix, - Config, - Dyn, - Gate, - Group, - Insert, - Mix, - Preamp, - Send, -) +from .shared import EQ, Config, Group, Mix, Preamp, Send class IRtn(abc.ABC): diff --git a/xair_api/shared.py b/xair_api/shared.py index 70b588a..bf7d71b 100644 --- a/xair_api/shared.py +++ b/xair_api/shared.py @@ -481,7 +481,7 @@ class EQ: @type.setter def type(self, val: int): - self.setter(f"type", val) + self.setter("type", val) @property def frequency(self) -> float: @@ -528,7 +528,7 @@ class GEQ: f"slider_{param}": geq_prop(param) for param in [ "20", "25", "31_5", "40", "50", "63", "80", "100", "125", - "160", "200", "250", "315" "400", "500", "630", "800", "1k", + "160", "200", "250", "315", "400", "500", "630", "800", "1k", "1k25", "1k6", "2k", "2k5", "3k15", "4k", "5k", "6k3", "8k", "10k", "12k5", "16k", "20k", ] @@ -641,10 +641,10 @@ class Send: @property @util.db_from - def level(self): + def level(self) -> float: return self.getter("level")[0] @level.setter @util.db_to - def level(self, val): + def level(self, val: float): self.setter("level", val) diff --git a/xair_api/strip.py b/xair_api/strip.py index e6f2072..fe7199f 100644 --- a/xair_api/strip.py +++ b/xair_api/strip.py @@ -1,20 +1,7 @@ import abc -from .errors import XAirRemoteError from .meta import mute_prop -from .shared import ( - EQ, - GEQ, - Automix, - Config, - Dyn, - Gate, - Group, - Insert, - Mix, - Preamp, - Send, -) +from .shared import EQ, Automix, Config, Dyn, Gate, Group, Insert, Mix, Preamp, Send class IStrip(abc.ABC):