Skip to content

Commit 66c9ed3

Browse files
committed
Format PlatformDetect updater
1 parent 11ef5f3 commit 66c9ed3

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

scripts/update_platformdetect_min.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def update_requirement(version: str) -> bool:
3838
setup_text = SETUP_PY.read_text(encoding="utf-8")
3939
match = REQUIREMENT_RE.search(setup_text)
4040
if not match:
41-
raise RuntimeError("Could not find Adafruit-PlatformDetect requirement in setup.py")
41+
raise RuntimeError(
42+
"Could not find Adafruit-PlatformDetect requirement in setup.py"
43+
)
4244

4345
current_version = match.group(2)
4446
if release_tuple(version) <= release_tuple(current_version):
@@ -50,7 +52,9 @@ def update_requirement(version: str) -> bool:
5052

5153
updated_text = REQUIREMENT_RE.sub(rf"\g<1>{version}\3", setup_text, count=1)
5254
SETUP_PY.write_text(updated_text, encoding="utf-8")
53-
print(f"Updated Adafruit-PlatformDetect minimum from {current_version} to {version}")
55+
print(
56+
f"Updated Adafruit-PlatformDetect minimum from {current_version} to {version}"
57+
)
5458
return True
5559

5660

0 commit comments

Comments
 (0)