Skip to content

Commit d3f28bd

Browse files
authored
fix extra parameter (#101) (#109)
* fix extra parameter in on_rebalance call (#101)
1 parent f541b5a commit d3f28bd

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

faust/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import typing
2424
from typing import Any, Mapping, NamedTuple, Optional, Sequence, Tuple
2525

26-
__version__ = "0.5.1"
26+
__version__ = "0.5.2"
2727
__author__ = "Robinhood Markets, Inc."
2828
2929
__homepage__ = "https://github.com/faust-streaming/faust"

faust/tables/base.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -568,9 +568,7 @@ async def on_rebalance(
568568
generation_id: int = 0,
569569
) -> None:
570570
"""Call when cluster is rebalancing."""
571-
await self.data.on_rebalance(
572-
self, assigned, revoked, newly_assigned, generation_id
573-
)
571+
await self.data.on_rebalance(assigned, revoked, newly_assigned, generation_id)
574572

575573
async def on_recovery_completed(
576574
self, active_tps: Set[TP], standby_tps: Set[TP]

tests/unit/tables/test_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ async def test_on_rebalance(self, *, table):
559559
generation_id = 1
560560
await table.on_rebalance({TP1}, set(), set(), generation_id)
561561
table._data.on_rebalance.assert_called_once_with(
562-
table, {TP1}, set(), set(), generation_id
562+
{TP1}, set(), set(), generation_id
563563
)
564564

565565
@pytest.mark.asyncio

0 commit comments

Comments
 (0)