Skip to content

Commit 58d7b0a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3f110f3 commit 58d7b0a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

ardupilot_methodic_configurator/backend_internet.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import hashlib
1212
import os
13+
import re
1314
import shutil
1415
import subprocess
1516
import sys
@@ -24,7 +25,6 @@
2425
from typing import Any, Callable, Optional
2526
from urllib.parse import urljoin
2627
from webbrowser import open as webbrowser_open
27-
import re
2828

2929
from platformdirs import user_config_dir
3030
from requests import HTTPError as requests_HTTPError
@@ -157,7 +157,8 @@ def get_release_info(name: str, should_be_pre_release: bool, timeout: int = 30)
157157

158158

159159
def get_expected_sha256_from_release(release_info: dict[str, Any], filename: str, timeout: int = 30) -> Optional[str]:
160-
"""Try to obtain the expected SHA256 for a release asset.
160+
"""
161+
Try to obtain the expected SHA256 for a release asset.
161162
162163
This searches release assets for checksum files (SHA256SUMS, *.sha256,
163164
checksums.txt) and parses them for the given filename. As a fallback

ardupilot_methodic_configurator/data_model_software_updates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
from ardupilot_methodic_configurator.backend_internet import (
3030
download_and_install_on_windows,
3131
download_and_install_pip_release,
32-
get_release_info,
3332
get_expected_sha256_from_release,
33+
get_release_info,
3434
webbrowser_open_url,
3535
)
3636
from ardupilot_methodic_configurator.frontend_tkinter_software_update import UpdateDialog
@@ -78,7 +78,7 @@ def _perform_download(self, latest_release: dict[str, Any]) -> bool:
7878
logging_error(_("No suitable assets found for Windows installation"))
7979
return False
8080

81-
expected_sha256 = get_expected_sha256_from_release(latest_release, asset["name"])
81+
expected_sha256 = get_expected_sha256_from_release(latest_release, asset["name"])
8282
return download_and_install_on_windows(
8383
download_url=asset["browser_download_url"],
8484
file_name=asset["name"],

0 commit comments

Comments
 (0)