Skip to content

Commit 251a0ea

Browse files
committed
treewide: fix outstanding Python lint issues
1 parent 1120e12 commit 251a0ea

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

flavors/lineageos/update_device_metadata.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from typing import Any
66
import json
7-
import urllib.request
87
import os
98
import pathlib
109

scripts/robotnix_common.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@ def save(filename: str, data: Any) -> None:
3333
)
3434

3535

36-
def get_store_path(path):
36+
def get_store_path(path_str: str) -> str:
3737
"""Get actual path to a Nix store path; supports handling local remotes"""
38-
prefix = os.getenv("NIX_REMOTE")
38+
prefix_str = os.getenv("NIX_REMOTE")
3939

40-
if not prefix:
41-
return path
40+
if not prefix_str:
41+
return path_str
4242

43-
prefix = Path(prefix)
43+
prefix = Path(prefix_str)
4444

4545
if not prefix.is_absolute():
4646
raise Exception(
4747
f"Must be run on a local Nix store. Current Nix store: {prefix}"
4848
)
4949

50-
path = Path(path).resolve()
50+
path = Path(path_str).resolve()
5151
remote_path = prefix.resolve().joinpath(
5252
path.relative_to(f"{path.drive}{path.root}")
5353
)

0 commit comments

Comments
 (0)