Skip to content

Commit 05164ef

Browse files
committed
Revert "Support using BackgroundService as a *mixin*"
Since `Reconfigurable` was removed we don't need this anymore. The added possibility to use as a mixin doesn't seem to justify the loss of safety of adding arbitrary keyword arguments to the constructor. This reverts commit 5eb64165e8603bb50a5c0eb661de7c5770022cb2. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent c34c199 commit 05164ef

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/frequenz/sdk/actor/_background_service.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,15 @@ async def main() -> None:
6969
```
7070
"""
7171

72-
def __init__(self, *, name: str | None = None, **kwargs: Any) -> None:
72+
def __init__(self, *, name: str | None = None) -> None:
7373
"""Initialize this BackgroundService.
7474
7575
Args:
7676
name: The name of this background service. If `None`, `str(id(self))` will
7777
be used. This is used mostly for debugging purposes.
78-
**kwargs: Additional keyword arguments to be passed to the parent class
79-
constructor. This is only provided to allow this class to be used as
80-
a mixin alonside other classes that require additional keyword
81-
arguments.
8278
"""
8379
self._name: str = str(id(self)) if name is None else name
8480
self._tasks: set[asyncio.Task[Any]] = set()
85-
super().__init__(**kwargs)
8681

8782
@abc.abstractmethod
8883
def start(self) -> None:

0 commit comments

Comments
 (0)