diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a945bd3..2d99418 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,6 +30,8 @@ repos: rev: v1.7.5 hooks: - id: docformatter + language: python + - repo: https://github.com/PyCQA/flake8 rev: 7.1.1 diff --git a/kfk/commands/clusters.py b/kfk/commands/clusters.py index 41061b6..fd6ad70 100644 --- a/kfk/commands/clusters.py +++ b/kfk/commands/clusters.py @@ -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) diff --git a/kfk/commands/connect/clusters.py b/kfk/commands/connect/clusters.py index 42c1541..e4f2c1f 100644 --- a/kfk/commands/connect/clusters.py +++ b/kfk/commands/connect/clusters.py @@ -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"] = [] diff --git a/pyproject.toml b/pyproject.toml index 9be71af..001b304 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ dev = [ "isort", "black", "mypy", - "pre-commit", + "pre-commit<4", "bandit", "autoflake" ]