Skip to content

Commit

Permalink
Fix Pyright warning about type override without default value (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
disrupted authored Aug 15, 2024
1 parent 3ab8885 commit 2844031
Show file tree
Hide file tree
Showing 16 changed files with 7 additions and 21 deletions.
6 changes: 4 additions & 2 deletions docs/docs/schema/defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,8 @@
},
"required": [
"name",
"namespace"
"namespace",
"values"
],
"title": "StreamsBootstrap",
"type": "object"
Expand Down Expand Up @@ -1544,7 +1545,8 @@
},
"required": [
"name",
"namespace"
"namespace",
"values"
],
"title": "StreamsBootstrapV3",
"type": "object"
Expand Down
1 change: 0 additions & 1 deletion kpops/components/base_components/helm_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class HelmApp(KubernetesApp):
description=describe_attr("version", __doc__),
)
values: HelmAppValues = Field(
default=...,
description=describe_attr("values", __doc__),
)

Expand Down
1 change: 0 additions & 1 deletion kpops/components/base_components/kafka_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class KafkaApp(PipelineComponent, ABC):
"""Base component for Kafka-based components.
Producer or streaming apps should inherit from this class.
"""

@override
Expand Down
1 change: 0 additions & 1 deletion kpops/components/base_components/kafka_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ class KafkaConnector(PipelineComponent, ABC):
"""

config: KafkaConnectorConfig = Field(
default=...,
description=describe_attr("config", __doc__),
)
resetter_namespace: str | None = Field(
Expand Down
2 changes: 0 additions & 2 deletions kpops/components/base_components/kubernetes_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ class KubernetesApp(PipelineComponent, ABC):
"""

namespace: str = Field(
default=...,
description=describe_attr("namespace", __doc__),
)
values: KubernetesAppValues = Field(
default=...,
description=describe_attr("values", __doc__),
)

Expand Down
3 changes: 1 addition & 2 deletions kpops/components/common/streams_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class StreamsBootstrapValues(HelmAppValues):
)

streams: KafkaStreamsConfig = Field(
default=..., description=describe_attr("streams", __doc__)
description=describe_attr("streams", __doc__),
)


Expand All @@ -121,7 +121,6 @@ class StreamsBootstrap(HelmApp, ABC):
"""

values: StreamsBootstrapValues = Field(
default_factory=StreamsBootstrapValues,
description=describe_attr("values", __doc__),
)

Expand Down
2 changes: 1 addition & 1 deletion kpops/components/streams_bootstrap/producer/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ProducerAppValues(StreamsBootstrapValues):
"""

streams: ProducerStreamsConfig = Field(
default=..., description=describe_attr("streams", __doc__)
description=describe_attr("streams", __doc__),
)

model_config = ConfigDict(extra="allow")
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class ProducerApp(KafkaApp, StreamsBootstrap):
"""

values: ProducerAppValues = Field(
default=...,
description=describe_attr("values", __doc__),
)
from_: None = Field(
Expand Down
1 change: 0 additions & 1 deletion kpops/components/streams_bootstrap/streams/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ class StreamsAppValues(StreamsBootstrapValues):
"""

streams: StreamsConfig = Field(
default=...,
description=describe_attr("streams", __doc__),
)
autoscaling: StreamsAppAutoScaling | None = Field(
Expand Down
1 change: 0 additions & 1 deletion kpops/components/streams_bootstrap/streams/streams_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class StreamsApp(KafkaApp, StreamsBootstrap):
"""

values: StreamsAppValues = Field(
default=...,
description=describe_attr("values", __doc__),
)

Expand Down
1 change: 0 additions & 1 deletion kpops/components/streams_bootstrap_v3/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class StreamsBootstrapV3(KafkaApp, HelmApp, ABC):
"""

values: StreamsBootstrapV3Values = Field(
default_factory=StreamsBootstrapV3Values,
description=describe_attr("values", __doc__),
)

Expand Down
1 change: 0 additions & 1 deletion kpops/components/streams_bootstrap_v3/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class StreamsBootstrapV3Values(HelmAppValues):
)

kafka: KafkaConfig = Field(
default=...,
description=describe_attr("kafka", __doc__),
)

Expand Down
4 changes: 1 addition & 3 deletions kpops/components/streams_bootstrap_v3/producer/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ class ProducerAppValues(StreamsBootstrapV3Values):
:param kafka: Kafka Streams settings
"""

kafka: ProducerConfig = Field(
default=..., description=describe_attr("kafka", __doc__)
)
kafka: ProducerConfig = Field(description=describe_attr("kafka", __doc__))

model_config = ConfigDict(extra="allow")
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class ProducerAppV3(StreamsBootstrapV3):
"""

values: ProducerAppValues = Field(
default=...,
description=describe_attr("values", __doc__),
)
from_: None = Field(
Expand Down
1 change: 0 additions & 1 deletion kpops/components/streams_bootstrap_v3/streams/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ class StreamsAppValues(StreamsBootstrapV3Values):
"""

kafka: StreamsConfig = Field(
default=...,
description=describe_attr("kafka", __doc__),
)
autoscaling: StreamsAppAutoScaling | None = Field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class StreamsAppV3(StreamsBootstrapV3):
"""

values: StreamsAppValues = Field(
default=...,
description=describe_attr("values", __doc__),
)

Expand Down

0 comments on commit 2844031

Please sign in to comment.