mirror of
https://github.com/aclist/dztui.git
synced 2026-10-28 21:52:46 +01:00
feat: casefold mod names before sorting
This commit is contained in:
1 parent
5757f79755
commit
8bcb64810d
5 files changed
+23
-17
No files matched your search
+3
-2
@@ -1,16 +1,17 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
def read_json(path: Path) -> dict:
|
||||
def read_json(path: Path) -> Any:
|
||||
try:
|
||||
with open(path, "r") as infile:
|
||||
try:
|
||||
data = json.load(infile)
|
||||
return data
|
||||
except json.decoder.JSONDecodeError as e:
|
||||
raise e
|
||||
except OSError as e:
|
||||
raise e
|
||||
return data
|
||||
|
||||
|
||||
def write_json(data: dict, path: Path) -> None:
|
||||
|
||||
Reference in new issue
Block a user