Skip to content

Commit

Permalink
fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
KerstenBreuer committed Oct 7, 2023
1 parent fcd02c6 commit 9d3ee69
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions examples/stream_calc/sc_tests/integration/test_event_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from stream_calc.config import Config
from stream_calc.main import main

DEFAULT_CONFIG = Config()
DEFAULT_CONFIG = Config() # type: ignore


class Event(NamedTuple):
Expand Down Expand Up @@ -207,7 +207,7 @@ async def test_receive_calc_publish(cases: list[Case] = deepcopy(CASES)):

# run the stream_calc app:
# (for each problem separately to avoid running forever)
config = Config(kafka_servers=[kafka_server])
config = Config(kafka_servers=[kafka_server]) # type: ignore
for _ in cases:
await main(config=config, run_forever=False)

Expand Down
4 changes: 3 additions & 1 deletion examples/stream_calc/stream_calc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def get_container(config: Config) -> Container:
return container


async def main(*, config: Config = Config(), run_forever: bool = True) -> None:
async def main(
*, config: Config = Config(), run_forever: bool = True # type: ignore
) -> None:
"""
Coroutine to run the stream calculator.
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_akafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async def test_kafka_event_publisher(kafka_fixture: KafkaFixture): # noqa: F811
key = "test_key"
topic = "test_topic"

config = KafkaConfig(
config = KafkaConfig( # type: ignore
service_name="test_publisher",
service_instance_id="1",
kafka_servers=kafka_fixture.kafka_servers,
Expand Down Expand Up @@ -79,7 +79,7 @@ async def test_kafka_event_subscriber(kafka_fixture: KafkaFixture): # noqa: F81
)

# setup the provider:
config = KafkaConfig(
config = KafkaConfig( # type: ignore
service_name="event_subscriber",
service_instance_id="1",
kafka_servers=kafka_fixture.kafka_servers,
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/test_akafka_testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async def test_event_recorder(
"""Test event recording using the EventRecorder class."""
topic = "test_topic"

config = KafkaConfig(
config = KafkaConfig( # type: ignore
service_name="test_publisher",
service_instance_id="1",
kafka_servers=kafka_fixture.kafka_servers,
Expand Down Expand Up @@ -142,7 +142,7 @@ async def test_expect_events_happy(
]
topic = "test_topic"

config = KafkaConfig(
config = KafkaConfig( # type: ignore
service_name="test_publisher",
service_instance_id="1",
kafka_servers=kafka_fixture.kafka_servers,
Expand Down Expand Up @@ -240,7 +240,7 @@ async def test_expect_events_mismatch(
]
topic = "test_topic"

config = KafkaConfig(
config = KafkaConfig( # type: ignore
service_name="test_publisher",
service_instance_id="1",
kafka_servers=kafka_fixture.kafka_servers,
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_akafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def test_kafka_event_publisher():
producer_class = Mock(return_value=producer)

# publish event using the provider:
config = KafkaConfig(
config = KafkaConfig( # type: ignore
service_name="test_publisher",
service_instance_id="1",
kafka_servers=["my-fake-kafka-server"],
Expand Down Expand Up @@ -156,7 +156,7 @@ async def test_kafka_event_subscriber(
translator.types_of_interest = types_of_interest

# setup the provider:
config = KafkaConfig(
config = KafkaConfig( # type: ignore
service_name=service_name,
service_instance_id="1",
kafka_servers=["my-fake-kafka-server"],
Expand Down

0 comments on commit 9d3ee69

Please sign in to comment.