lint fixes

fix {DCA}.name setter

removed unused imports

patch bump
This commit is contained in:
onyx-and-iris 2024-02-14 22:06:28 +00:00
parent 06be2f2831
commit b295fee6e1
10 changed files with 18 additions and 49 deletions

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "xair-api" name = "xair-api"
version = "2.2.4" version = "2.2.5"
description = "Remote control Behringer X-Air | Midas MR mixers through OSC" description = "Remote control Behringer X-Air | Midas MR mixers through OSC"
authors = ["onyx-and-iris <code@onyxandiris.online>"] authors = ["onyx-and-iris <code@onyxandiris.online>"]
license = "MIT" license = "MIT"

View File

@ -25,13 +25,13 @@ class FxRtn(IFxRtn):
class MainStereo(ILR): class MainStereo(ILR):
@property @property
def address(self) -> str: def address(self) -> str:
return f"/main/st" return "/main/st"
class MainMono(ILR): class MainMono(ILR):
@property @property
def address(self) -> str: def address(self) -> str:
return f"/main/m" return "/main/m"
class Matrix(ILR): class Matrix(ILR):

View File

@ -1,8 +1,7 @@
import abc import abc
from .errors import XAirRemoteError
from .meta import mute_prop 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): class IBus(abc.ABC):

View File

@ -33,8 +33,8 @@ class Config(IConfig):
Returns a Config class of a kind. Returns a Config class of a kind.
""" """
LINKS_cls = _make_links_mixins[remote.kind.id_] LINKS_cls = _make_links_mixins[remote.kind.id_]
MUTEGROUP_cls = type(f"MuteGroup", (Config.MuteGroup, cls), {}) MUTEGROUP_cls = type("MuteGroup", (Config.MuteGroup, cls), {})
MONITOR_cls = type(f"ConfigMonitor", (Config.Monitor, cls), {}) MONITOR_cls = type("ConfigMonitor", (Config.Monitor, cls), {})
CONFIG_cls = type( CONFIG_cls = type(
f"Config{remote.kind}", f"Config{remote.kind}",
(cls, LINKS_cls), (cls, LINKS_cls),
@ -47,7 +47,7 @@ class Config(IConfig):
@property @property
def address(self) -> str: def address(self) -> str:
return f"/config" return "/config"
@property @property
def amixenable(self) -> bool: def amixenable(self) -> bool:
@ -105,7 +105,7 @@ class Config(IConfig):
@source.setter @source.setter
def source(self, val: int): def source(self, val: int):
self.setter(f"source", val) self.setter("source", val)
@property @property
def sourcetrim(self) -> float: def sourcetrim(self) -> float:

View File

@ -1,7 +1,5 @@
import abc import abc
from .errors import XAirRemoteError
class IDCA(abc.ABC): class IDCA(abc.ABC):
"""Abstract Base Class for DCA groups""" """Abstract Base Class for DCA groups"""
@ -50,7 +48,7 @@ class DCA(IDCA):
@name.setter @name.setter
def name(self, val: str): def name(self, val: str):
self.setter("config/name")[0] self.setter("config/name", val)
@property @property
def color(self) -> int: def color(self) -> int:

View File

@ -1,8 +1,7 @@
import abc import abc
from .errors import XAirRemoteError
from .meta import mute_prop 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): class IFX(abc.ABC):

View File

@ -1,9 +1,8 @@
import abc import abc
from typing import Optional from typing import Optional
from .errors import XAirRemoteError
from .meta import mute_prop 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): class ILR(abc.ABC):
@ -61,4 +60,4 @@ class LR(ILR):
@property @property
def address(self) -> str: def address(self) -> str:
return f"/lr" return "/lr"

View File

@ -1,21 +1,8 @@
import abc import abc
from typing import Optional from typing import Optional
from .errors import XAirRemoteError
from .meta import mute_prop from .meta import mute_prop
from .shared import ( from .shared import EQ, Config, Group, Mix, Preamp, Send
EQ,
GEQ,
Automix,
Config,
Dyn,
Gate,
Group,
Insert,
Mix,
Preamp,
Send,
)
class IRtn(abc.ABC): class IRtn(abc.ABC):

View File

@ -481,7 +481,7 @@ class EQ:
@type.setter @type.setter
def type(self, val: int): def type(self, val: int):
self.setter(f"type", val) self.setter("type", val)
@property @property
def frequency(self) -> float: def frequency(self) -> float:
@ -528,7 +528,7 @@ class GEQ:
f"slider_{param}": geq_prop(param) f"slider_{param}": geq_prop(param)
for param in [ for param in [
"20", "25", "31_5", "40", "50", "63", "80", "100", "125", "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", "1k25", "1k6", "2k", "2k5", "3k15", "4k", "5k", "6k3", "8k",
"10k", "12k5", "16k", "20k", "10k", "12k5", "16k", "20k",
] ]
@ -641,10 +641,10 @@ class Send:
@property @property
@util.db_from @util.db_from
def level(self): def level(self) -> float:
return self.getter("level")[0] return self.getter("level")[0]
@level.setter @level.setter
@util.db_to @util.db_to
def level(self, val): def level(self, val: float):
self.setter("level", val) self.setter("level", val)

View File

@ -1,20 +1,7 @@
import abc import abc
from .errors import XAirRemoteError
from .meta import mute_prop from .meta import mute_prop
from .shared import ( from .shared import EQ, Automix, Config, Dyn, Gate, Group, Insert, Mix, Preamp, Send
EQ,
GEQ,
Automix,
Config,
Dyn,
Gate,
Group,
Insert,
Mix,
Preamp,
Send,
)
class IStrip(abc.ABC): class IStrip(abc.ABC):