Skip to content

Commit

Permalink
ci(ruff-raise): autofix "RSE"
Browse files Browse the repository at this point in the history
  • Loading branch information
sujuka99 committed Sep 26, 2023
1 parent b93c3d8 commit 9a8678a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion kpops/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def clean(
def version_callback(show_version: bool) -> None:
if show_version:
typer.echo(f"KPOps {__version__}")
raise typer.Exit()
raise typer.Exit


@app.callback()
Expand Down
2 changes: 1 addition & 1 deletion kpops/component_handlers/helm_wrapper/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def parse_helm_command_stderr_output(stderr: str) -> None:
for line in stderr.splitlines():
lower = line.lower()
if "release: not found" in lower:
raise ReleaseNotFoundException()
raise ReleaseNotFoundException
elif "error" in lower:
raise RuntimeError(stderr)
elif "warning" in lower:
Expand Down
4 changes: 2 additions & 2 deletions kpops/component_handlers/kafka_connect/connect_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def get_connector(self, connector_name: str) -> KafkaConnectResponse:
return KafkaConnectResponse(**response.json())
elif response.status_code == httpx.codes.NOT_FOUND:
log.info(f"The named connector {connector_name} does not exists.")
raise ConnectorNotFoundException()
raise ConnectorNotFoundException
elif response.status_code == httpx.codes.CONFLICT:
log.warning(
"Rebalancing in progress while getting a connector... Retrying...",
Expand Down Expand Up @@ -170,7 +170,7 @@ def delete_connector(self, connector_name: str) -> None:
return
elif response.status_code == httpx.codes.NOT_FOUND:
log.info(f"The named connector {connector_name} does not exists.")
raise ConnectorNotFoundException()
raise ConnectorNotFoundException
elif response.status_code == httpx.codes.CONFLICT:
log.warning(
"Rebalancing in progress while deleting a connector... Retrying...",
Expand Down
4 changes: 2 additions & 2 deletions kpops/component_handlers/topic/proxy_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def get_topic(self, topic_name: str) -> TopicResponse:
):
log.debug(f"Topic {topic_name} not found.")
log.debug(response.json())
raise TopicNotFoundException()
raise TopicNotFoundException

raise KafkaRestProxyError(response)

Expand Down Expand Up @@ -153,7 +153,7 @@ def get_topic_config(self, topic_name: str) -> TopicConfigResponse:
):
log.debug(f"Configs for {topic_name} not found.")
log.debug(response.json())
raise TopicNotFoundException()
raise TopicNotFoundException

raise KafkaRestProxyError(response)

Expand Down
2 changes: 1 addition & 1 deletion kpops/components/base_components/kafka_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class KafkaApp(KubernetesApp, ABC):
@property
def clean_up_helm_chart(self) -> str:
"""Helm chart used to destroy and clean this component."""
raise NotImplementedError()
raise NotImplementedError

@override
def deploy(self, dry_run: bool) -> None:
Expand Down
2 changes: 1 addition & 1 deletion kpops/pipeline_generator/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def parse_components(self, component_list: list[dict]) -> None:
msg,
) from ex
else:
raise ParsingException() from ex
raise ParsingException from ex

def apply_component(
self, component_class: type[PipelineComponent], component_data: dict,
Expand Down

0 comments on commit 9a8678a

Please sign in to comment.