Skip to content

Commit

Permalink
formatting | use precommit <4 as 4th version has issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mabulgu committed Nov 6, 2024
1 parent 699d3ed commit 3957f2c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ repos:
rev: v1.7.5
hooks:
- id: docformatter
language: python


- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
Expand Down
6 changes: 3 additions & 3 deletions kfk/commands/clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ def _update_replicas(replicas, zk_replicas, cluster_dict):
min_insync_replicas = 1
if replicas > 1:
min_insync_replicas = replicas - 1
cluster_dict["spec"]["kafka"]["config"][
"offsets.topic.replication.factor"
] = int(replicas)
cluster_dict["spec"]["kafka"]["config"]["offsets.topic.replication.factor"] = (
int(replicas)
)
cluster_dict["spec"]["kafka"]["config"][
"transaction.state.log.replication.factor"
] = int(replicas)
Expand Down
6 changes: 3 additions & 3 deletions kfk/commands/connect/clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ def alter(cluster, replicas, config_file, namespace):
).data
else:
cluster_dict["spec"].pop("image", None)
cluster_dict["spec"]["build"]["output"][
"image"
] = connect_properties.get(SpecialTexts.CONNECT_IMAGE).data
cluster_dict["spec"]["build"]["output"]["image"] = (
connect_properties.get(SpecialTexts.CONNECT_IMAGE).data
)

cluster_dict["spec"]["build"]["plugins"] = []

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dev = [
"isort",
"black",
"mypy",
"pre-commit",
"pre-commit<4",
"bandit",
"autoflake"
]
Expand Down

0 comments on commit 3957f2c

Please sign in to comment.