From 911d2f64a6404a1ea8c553b9052b837c1f068749 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sun, 8 Feb 2026 09:09:59 +0000 Subject: [PATCH] import abc namespace --- vban_cmd/bus.py | 4 ++-- vban_cmd/factory.py | 4 ++-- vban_cmd/iremote.py | 6 +++--- vban_cmd/strip.py | 4 ++-- vban_cmd/vban.py | 4 ++-- vban_cmd/vbancmd.py | 10 +++++----- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/vban_cmd/bus.py b/vban_cmd/bus.py index d767037..e9b030c 100644 --- a/vban_cmd/bus.py +++ b/vban_cmd/bus.py @@ -1,5 +1,5 @@ +import abc import time -from abc import abstractmethod from typing import Union from .enums import NBS, BusModes @@ -14,7 +14,7 @@ class Bus(IRemote): Defines concrete implementation for bus """ - @abstractmethod + @abc.abstractmethod def __str__(self): pass diff --git a/vban_cmd/factory.py b/vban_cmd/factory.py index b205cbc..ee17d6b 100644 --- a/vban_cmd/factory.py +++ b/vban_cmd/factory.py @@ -1,5 +1,5 @@ +import abc import logging -from abc import abstractmethod from enum import IntEnum from functools import cached_property from typing import Iterable @@ -115,7 +115,7 @@ class FactoryBase(VbanCmd): ) @property - @abstractmethod + @abc.abstractmethod def steps(self): pass diff --git a/vban_cmd/iremote.py b/vban_cmd/iremote.py index bb8fc86..4f30f2a 100644 --- a/vban_cmd/iremote.py +++ b/vban_cmd/iremote.py @@ -1,6 +1,6 @@ +import abc import logging import time -from abc import ABCMeta, abstractmethod from dataclasses import dataclass logger = logging.getLogger(__name__) @@ -78,7 +78,7 @@ class Modes: ) -class IRemote(metaclass=ABCMeta): +class IRemote(abc.ABC): """ Common interface between base class and extended (higher) classes @@ -111,7 +111,7 @@ class IRemote(metaclass=ABCMeta): return ''.join(cmd) @property - @abstractmethod + @abc.abstractmethod def identifier(self): pass diff --git a/vban_cmd/strip.py b/vban_cmd/strip.py index e4d9af0..57cfd92 100644 --- a/vban_cmd/strip.py +++ b/vban_cmd/strip.py @@ -1,5 +1,5 @@ +import abc import time -from abc import abstractmethod from typing import Union from . import kinds @@ -21,7 +21,7 @@ class Strip(IRemote): Defines concrete implementation for strip """ - @abstractmethod + @abc.abstractmethod def __str__(self): pass diff --git a/vban_cmd/vban.py b/vban_cmd/vban.py index f3d3107..8e31250 100644 --- a/vban_cmd/vban.py +++ b/vban_cmd/vban.py @@ -1,4 +1,4 @@ -from abc import abstractmethod +import abc from . import kinds from .iremote import IRemote @@ -11,7 +11,7 @@ class VbanStream(IRemote): Defines concrete implementation for vban stream """ - @abstractmethod + @abc.abstractmethod def __str__(self): pass diff --git a/vban_cmd/vbancmd.py b/vban_cmd/vbancmd.py index c473611..e963459 100644 --- a/vban_cmd/vbancmd.py +++ b/vban_cmd/vbancmd.py @@ -1,8 +1,8 @@ +import abc import logging import socket import threading import time -from abc import ABCMeta, abstractmethod from pathlib import Path from queue import Queue from typing import Iterable, Union @@ -18,8 +18,8 @@ from .worker import Producer, Subscriber, Updater logger = logging.getLogger(__name__) -class VbanCmd(metaclass=ABCMeta): - """Base class responsible for communicating with the VBAN RT Packet Service""" +class VbanCmd(abc.ABC): + """Abstract Base Class for Voicemeeter VBAN Command Interfaces""" DELAY = 0.001 # fmt: off @@ -49,7 +49,7 @@ class VbanCmd(metaclass=ABCMeta): self.stop_event = None self.producer = None - @abstractmethod + @abc.abstractmethod def __str__(self): """Ensure subclasses override str magic method""" pass @@ -58,7 +58,7 @@ class VbanCmd(metaclass=ABCMeta): try: import tomllib except ModuleNotFoundError: - import tomli as tomllib + import tomli as tomllib # type: ignore[import] def get_filepath(): for pn in (