remote is now our ABC - as it should be because it is the launching point of the interface.

it no longer inherits from CBindings.

move steps abstract method into Remote class. This is a much more meaningful abstraction - because it is the principle behaviour that distinguishes each kind of Remote.

add wrapper methods to CBindings. This provides a cleaner api for the Remote class.

import abc as namespace throughout the package.
This commit is contained in:
2026-03-15 22:02:17 +00:00
parent 84b4426e44
commit 842feb2407
8 changed files with 139 additions and 62 deletions

View File

@@ -1,11 +1,11 @@
import abc
import logging
import time
from abc import ABCMeta, abstractmethod
logger = logging.getLogger(__name__)
class IRemote(metaclass=ABCMeta):
class IRemote(abc.ABC):
"""
Common interface between base class and extended (higher) classes
@@ -33,7 +33,7 @@ class IRemote(metaclass=ABCMeta):
cmd += (f'.{param}',)
return ''.join(cmd)
@abstractmethod
@abc.abstractmethod
def identifier(self):
pass