Skip to content

Commit 038b2f8

Browse files
committed
style(updater): format
Signed-off-by: Me0wo <[email protected]>
1 parent 6133cc9 commit 038b2f8

File tree

7 files changed

+14
-10
lines changed

7 files changed

+14
-10
lines changed

Updater/config/model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ class PathConfig(BaseModel):
66
processName: str = "QuickNote"
77
tagPath: str = "./tags"
88

9+
910
class ProxyConfig(BaseModel):
1011
url: str = ""
1112

13+
1214
class Config(BaseModel):
1315
path: PathConfig = PathConfig()
14-
proxy: ProxyConfig = ProxyConfig()
16+
proxy: ProxyConfig = ProxyConfig()

Updater/config/yml_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
@lru_cache()
1010
def get_config() -> Config:
1111
with open(Path(__file__).parent.parent / "./data/config.yml", "r") as f:
12-
return Config(**yaml.safe_load(f) or {})
12+
return Config(**yaml.safe_load(f) or {})

Updater/data/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
path:
2-
workPath: ../
3-
processName: QuickNote.exe
4-
tagPath: ./data/tags
2+
workPath: ../
3+
processName: QuickNote.exe
4+
tagPath: ./data/tags
55

66
proxy:
7-
url: env
7+
url: env

Updater/updater/assets/name.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ def get_goos_goarch():
1616

1717
return platform.system().lower(), goarch
1818

19+
1920
def get_package_name_from_current_machine():
2021
goos, goarch = get_goos_goarch()
2122

2223
ext = ".zip" if goos == "windows" else ".tar.gz"
23-
return f"QuickNote_{goos}_{goarch}{ext}"
24+
return f"QuickNote_{goos}_{goarch}{ext}"

Updater/updater/runner/process.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def find_processes_by_path(target_path):
1717
continue
1818
return matches
1919

20+
2021
def try_terminate(proc):
2122
print(f"Trying to gracefully terminate PID {proc.pid} ({proc.name()})...")
2223
try:
@@ -28,4 +29,4 @@ def try_terminate(proc):
2829
print(f"Process {proc.pid} exited gracefully.")
2930
except (psutil.TimeoutExpired, psutil.NoSuchProcess):
3031
print(f"Process {proc.pid} did not exit. Killing...")
31-
proc.kill()
32+
proc.kill()

Updater/updater/tag/reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ def read():
66
with open(get_config().path.tagPath, "r") as f:
77
return f.read().strip()
88
except FileNotFoundError:
9-
return "v0.0.0"
9+
return "v0.0.0"

Updater/updater/tag/writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
def write(tag: str):
55
with open(get_config().path.tagPath, "w") as f:
6-
f.write(tag)
6+
f.write(tag)

0 commit comments

Comments
 (0)