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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ dev-mypy = [
"frequenz-client-dispatch[cli,dev-mkdocs,dev-noxfile,dev-pytest]",
"grpc-stubs == 1.53.0.6",
"types-protobuf == 7.34.1.20260408",
"types-python-dateutil == 2.9.0.20251115",
"types-python-dateutil == 2.9.0.20260408",
]
dev-noxfile = ["nox == 2026.4.10", "frequenz-repo-config[lib] == 0.17.0"]
dev-pylint = [
Expand Down
11 changes: 4 additions & 7 deletions src/frequenz/client/dispatch/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses import dataclass
from datetime import datetime, timedelta, timezone
from enum import Enum
from typing import Any, Self, SupportsInt, TypeAlias, cast, final
from typing import Any, Self, SupportsInt, TypeAlias, final

# pylint: enable=no-name-in-module
from frequenz.api.common.v1alpha8.microgrid.electrical_components.electrical_components_pb2 import (
Expand Down Expand Up @@ -540,12 +540,9 @@ def next_run_after(self, after: datetime) -> datetime | None:
return None

# No type information for rrule, so we need to cast
return cast(
datetime | None,
self.recurrence._as_rrule( # pylint: disable=protected-access
self.start_time
).after(after, inc=True),
)
return self.recurrence._as_rrule( # pylint: disable=protected-access
self.start_time
).after(after, inc=True)

def _until(self, now: datetime) -> datetime | None:
"""Calculate the time when the dispatch should end.
Expand Down
Loading