Skip to content

Commit a6633e3

Browse files
committed
rebase + review
Signed-off-by: Ian Eaves <ian.k.eaves@gmail.com>
1 parent 8534297 commit a6633e3

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed

ramalama/cli.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from typing import Any, get_args
1414
from urllib.parse import urlparse
1515

16-
from ramalama.benchmarks.errors import MissingStorageFolderError
1716
from ramalama.benchmarks.manager import BenchmarksManager
1817

1918
# if autocomplete doesn't exist, just do nothing, don't break
@@ -28,12 +27,8 @@
2827
import ramalama.chat as chat
2928
from ramalama import engine
3029
from ramalama.arg_types import DefaultArgsType
31-
<<<<<<< HEAD
32-
from ramalama.chat_utils import default_prefix
33-
=======
3430
from ramalama.benchmarks.utilities import print_bench_results
35-
from ramalama.chat import default_prefix
36-
>>>>>>> 8a473985 (adds benchmark metrics persistence)
31+
from ramalama.chat_utils import default_prefix
3732
from ramalama.cli_arg_normalization import normalize_pull_arg
3833
from ramalama.command.factory import assemble_command
3934
from ramalama.common import accel_image, get_accel, perror
@@ -659,13 +654,11 @@ def _list_models_from_store(args):
659654
size_sum += file.size
660655
last_modified = max(file.modified, last_modified)
661656

662-
ret.append(
663-
{
664-
"name": f"{model} (partial)" if is_partially_downloaded else model,
665-
"modified": datetime.fromtimestamp(last_modified, tz=local_timezone).isoformat(),
666-
"size": size_sum,
667-
}
668-
)
657+
ret.append({
658+
"name": f"{model} (partial)" if is_partially_downloaded else model,
659+
"modified": datetime.fromtimestamp(last_modified, tz=local_timezone).isoformat(),
660+
"size": size_sum,
661+
})
669662

670663
# sort the listed models according to the desired order
671664
ret.sort(key=lambda entry: entry[args.sort], reverse=args.order == "desc")

ramalama/config.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,21 @@ def _get_default_config_dirs() -> list[Path]:
4747
# Windows-specific paths using APPDATA and LOCALAPPDATA
4848
appdata = os.getenv("APPDATA", os.path.expanduser("~/AppData/Roaming"))
4949
localappdata = os.getenv("LOCALAPPDATA", os.path.expanduser("~/AppData/Local"))
50-
dirs.extend([
51-
Path(os.path.join(localappdata, "ramalama")),
52-
Path(os.path.join(appdata, "ramalama")),
53-
])
50+
dirs.extend(
51+
[
52+
Path(os.path.join(localappdata, "ramalama")),
53+
Path(os.path.join(appdata, "ramalama")),
54+
]
55+
)
5456
else:
5557
# Unix-specific paths
56-
dirs.extend([
57-
Path("/etc/ramalama"),
58-
Path(os.path.expanduser(os.path.join(os.getenv("XDG_DATA_HOME", "~/.local/share"), "ramalama"))),
59-
Path(os.path.expanduser(os.path.join(os.getenv("XDG_CONFIG_HOME", "~/.config"), "ramalama"))),
60-
])
58+
dirs.extend(
59+
[
60+
Path("/etc/ramalama"),
61+
Path(os.path.expanduser(os.path.join(os.getenv("XDG_DATA_HOME", "~/.local/share"), "ramalama"))),
62+
Path(os.path.expanduser(os.path.join(os.getenv("XDG_CONFIG_HOME", "~/.config"), "ramalama"))),
63+
]
64+
)
6165

6266
return dirs
6367

0 commit comments

Comments
 (0)