Skip to content

Commit

Permalink
fix pyflake indent issues 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ukablan-wpc committed Sep 30, 2024
1 parent 238b5db commit ff94d94
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pleskdistup/actions/distupgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,12 @@ def name(self, val: str) -> None:
self._name = val

def _do_check(self) -> bool:
log.debug(f"Checking leftover repo.list files")
archived_files = [f for f in
log.debug("Checking leftover repo.list files")
archived_files = [
f for f in
CheckAptReposBackups.get_all_repo_list_files(self.sources_list_path, self.sources_list_d_path)
if files.backup_exists(f)]
if files.backup_exists(f)
]
if archived_files:
self.description = self.description.format(",".join(archived_files))
return False
Expand Down Expand Up @@ -235,8 +237,10 @@ def _apply_replace_to_file(self, fpath: str, ptrn: re.Pattern, to_regexp: str) -
f.writelines(new_lines)

def _get_all_repo_list_files(self) -> typing.List[str]:
return CheckAptReposBackups.get_all_repo_list_files(self.sources_list_path,
self.sources_list_d_path)
return CheckAptReposBackups.get_all_repo_list_files(
self.sources_list_path,
self.sources_list_d_path,
)

def _rm_backups(self) -> None:
for f in self._get_all_repo_list_files():
Expand Down
1 change: 1 addition & 0 deletions pleskdistup/common/src/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

DEFAULT_BACKUP_EXTENSION = ".conversion.bak"


def replace_string(filename: str, original_substring: str, new_substring: str) -> None:
with open(filename, "r") as original, open(filename + ".next", "w") as dst:
for line in original.readlines():
Expand Down

0 comments on commit ff94d94

Please sign in to comment.