Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[build-system]
requires = [
"setuptools == 84.0.0",
"setuptools_scm[toml] == 10.2.1",
"setuptools_scm[toml] == 10.3.4",
"frequenz-repo-config[lib] == 0.19.0",
]
build-backend = "setuptools.build_meta"
Expand Down Expand Up @@ -48,7 +48,7 @@ email = "floss@frequenz.com"

[project.optional-dependencies]
dev-flake8 = [
"flake8 == 7.3.0",
"flake8 == 7.4.1",
"flake8-datetimez == 26.8.1",
"flake8-docstrings == 1.7.0",
"flake8-pyproject == 1.2.4", # For reading the flake8 config from pyproject.toml
Expand All @@ -58,7 +58,7 @@ dev-flake8 = [
dev-formatting = ["black == 26.5.1", "isort == 9.0.1"]
dev-mkdocs = [
"black == 26.5.1",
"Markdown==3.10.3",
"Markdown==3.11",
"mike == 2.2.0",
"mkdocs-gen-files == 0.6.1",
"mkdocs-literate-nav == 0.6.3",
Expand All @@ -69,7 +69,7 @@ dev-mkdocs = [
"frequenz-repo-config[lib] == 0.19.0",
]
dev-mypy = [
"mypy == 2.3.1",
"mypy == 2.4.0",
"types-Markdown == 3.10.2.20260712",
"types-protobuf == 7.35.1.20260827",
"types-setuptools == 84.0.0.20260812",
Expand All @@ -84,13 +84,13 @@ dev-pylint = [
]
dev-pytest = [
"pytest == 9.1.1",
"pylint == 4.0.9", # We need this to check for the examples
"pylint == 4.1.1", # We need this to check for the examples
"frequenz-repo-config[extra-lint-examples] == 0.19.0",
"pytest-mock == 3.15.1",
"pytest-mock == 3.16.0",
"pytest-asyncio == 1.4.0",
"time-machine == 2.16.0",
"async-solipsism == 0.9",
"hypothesis == 6.165.10",
"hypothesis == 6.168.3",
]
dev = [
"frequenz-sdk[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]",
Expand Down
1 change: 1 addition & 0 deletions src/frequenz/sdk/actor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ class we are implementing to make sure actors are properly initialized.
???+ example "Example echo actor"

```python
# pylint: disable=abstract-method
from frequenz.channels import Receiver, Sender
from frequenz.sdk.actor import Actor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
_logger = logging.getLogger(__name__)


class EVChargerManager(ComponentManager):
# `_unreachable_power_formula()` is an optional hook, only needed by managers that
# subscribe to unreachable power, which this one doesn't. Pylint considers it abstract
# because its default implementation raises `NotImplementedError`.
class EVChargerManager(ComponentManager): # pylint: disable=abstract-method
"""Manage ev chargers for the power distributor."""

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ def __init__( # pylint: disable=too-many-arguments

self._batteries = self.component_ids
self._working_batteries: set[ComponentId] = set()
self._min_update_interval: timedelta = min_update_interval
self._active_methods: dict[str, MetricAggregator[Any]] = {}
self._power_distributing_namespace: str = f"power-distributor-{self.namespace}"
self._update_battery_status_task: asyncio.Task[None] | None = None

if self._batteries:
self._update_battery_status_task = asyncio.create_task(
self._update_battery_status(self.status_receiver)
)
self._min_update_interval: timedelta = min_update_interval
self._active_methods: dict[str, MetricAggregator[Any]] = {}
self._power_distributing_namespace: str = f"power-distributor-{self.namespace}"

@staticmethod
def get_component_class() -> Type[Component]:
Expand Down
3 changes: 2 additions & 1 deletion tests/actor/test_actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

"""Simple test for the BaseActor."""

import abc
import asyncio
from datetime import timedelta

Expand All @@ -18,7 +19,7 @@ class MyBaseException(BaseException):
"""A base exception for testing purposes."""


class BaseTestActor(Actor):
class BaseTestActor(Actor, abc.ABC):
"""A base actor for testing purposes."""

restart_count: int = -1
Expand Down
Loading