We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05203c0 commit 1a9aa48Copy full SHA for 1a9aa48
1 file changed
vectordb_bench/cli/cli.py
@@ -40,9 +40,10 @@
40
41
def click_get_defaults_from_file(ctx, param, value): # noqa: ANN001, ARG001
42
if value:
43
- input_file = value if Path.exists(value) else Path.join(config.CONFIG_LOCAL_DIR, value)
+ path = Path(value)
44
+ input_file = path if path.exists() else Path(config.CONFIG_LOCAL_DIR, path)
45
try:
- with Path.open(input_file) as f:
46
+ with input_file.open() as f:
47
_config: dict[str, dict[str, Any]] = load(f.read(), Loader=Loader) # noqa: S506
48
ctx.default_map = _config.get(ctx.command.name, {})
49
except Exception as e:
0 commit comments