Skip to content

Commit 1f4ab48

Browse files
committed
fix: linted docs
Signed-off-by: Krzysztof Milde <[email protected]>
1 parent 7eaf32a commit 1f4ab48

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

csp/tests/adapters/test_kafka.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ def graph(count: int):
690690
info_category = csp.sample(c, csp.const("A"))
691691
info_score = csp.apply(c, lambda x: x * 10.0, float)
692692
info = NestedInfo.collectts(category=info_category, score=info_score)
693-
693+
694694
# Cycle through enum values
695695
status_values = [MyEnum.OPTION_A, MyEnum.OPTION_B, MyEnum.OPTION_C]
696696
status = csp.apply(c, lambda x: status_values[(x - 1) % 3], MyEnum)
@@ -773,9 +773,7 @@ def graph(count: int):
773773
key = csp.sample(c, csp.const("optional_key"))
774774
optional_count = csp.apply(c, lambda x: x * 10, int)
775775

776-
pub_struct = OptionalData.collectts(
777-
key=key, required_value=c, optional_count=optional_count
778-
)
776+
pub_struct = OptionalData.collectts(key=key, required_value=c, optional_count=optional_count)
779777

780778
kafkaadapter.publish(msg_mapper, topic, ["key"], pub_struct)
781779

@@ -973,6 +971,7 @@ def graph():
973971
@pytest.mark.skipif(not os.environ.get("CSP_TEST_KAFKA"), reason="Skipping kafka adapter tests")
974972
def test_avro_invalid_schema(self, kafkaadapter):
975973
"""Test that invalid Avro schema raises proper error"""
974+
976975
class TestStruct(csp.Struct):
977976
key: str
978977
value: int
@@ -1004,6 +1003,7 @@ def graph():
10041003
@pytest.mark.skipif(not os.environ.get("CSP_TEST_KAFKA"), reason="Skipping kafka adapter tests")
10051004
def test_avro_missing_schema(self, kafkaadapter):
10061005
"""Test that missing Avro schema raises proper error"""
1006+
10071007
class TestStruct(csp.Struct):
10081008
key: str
10091009
value: int
@@ -1025,6 +1025,7 @@ def graph():
10251025
@pytest.mark.skipif(not os.environ.get("CSP_TEST_KAFKA"), reason="Skipping kafka adapter tests")
10261026
def test_avro_empty_arrays(self, kafkaadapter):
10271027
"""Test Avro round-trip with empty arrays"""
1028+
10281029
class EmptyArrayData(csp.Struct):
10291030
key: str
10301031
tags: [str]

docs/wiki/api-references/Input-Output-Adapters-API.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ mapper = AvroMessageMapper(
116116
```
117117

118118
The Avro mapper supports:
119+
119120
- Basic types: bool, int, long, double, string
120121
- Complex types: nested records (structs), arrays
121122
- Nullable fields via Avro unions (e.g., `["null", "long"]`)
@@ -261,6 +262,7 @@ csp.run(publish_graph, starttime=datetime.utcnow())
261262
```
262263

263264
The Avro format provides significant performance benefits over JSON:
265+
264266
- Smaller message size (binary encoding)
265267
- Faster serialization/deserialization
266268
- Schema validation at compile time

0 commit comments

Comments
 (0)