Skip to content

Commit

Permalink
chore(ruff-pylint): manually fix code flagged by "PL"
Browse files Browse the repository at this point in the history
  • Loading branch information
sujuka99 committed Sep 26, 2023
1 parent 0d65ea8 commit 54d4b4e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion hooks/gen_docs/gen_docs_cli_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"--output",
str(PATH_CLI_COMMANDS_DOC),
]
subprocess.run(typer_args)
subprocess.run(typer_args, check=True, capture_output=True)

# Replace wrong title in CLI Usage doc
with PATH_CLI_COMMANDS_DOC.open("r") as f:
Expand Down
1 change: 1 addition & 0 deletions kpops/component_handlers/helm_wrapper/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ def __execute(self, command: list[str]) -> str:
log.debug(f"Executing {' '.join(command)}")
process = subprocess.run(
command,
check=True,
capture_output=True,
text=True,
)
Expand Down
6 changes: 3 additions & 3 deletions kpops/utils/dict_differ.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def from_dicts(
d1: dict, d2: dict, ignore: set[str] | None = None,
) -> Iterator[Diff]:
for diff_type, keys, changes in diff(d1, d2, ignore=ignore):
if not isinstance(changes, list):
changes = [("", changes)]
for key, change in changes:
if not isinstance(changes_tmp:=changes, list):
changes_tmp = [("", changes)]
for key, change in changes_tmp:
yield Diff(
DiffType.from_str(diff_type),
Diff.__find_changed_key(keys, key),
Expand Down
5 changes: 2 additions & 3 deletions kpops/utils/dict_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ def update_nested_pair(original_dict: dict, other_dict: Mapping) -> dict:
nested_val = original_dict.get(key, {})
if isinstance(nested_val, dict):
original_dict[key] = update_nested_pair(nested_val, value)
else:
if key not in original_dict:
original_dict[key] = value
elif key not in original_dict:
original_dict[key] = value
return original_dict


Expand Down

0 comments on commit 54d4b4e

Please sign in to comment.