Skip to content

Commit

Permalink
fix more lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mayankjobanputra committed Aug 29, 2024
1 parent 17b370c commit 54681ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/banks/registries/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ def set_meta(self, *, meta: dict, name: str, version: str | None = None, overwri
self._meta_path.mkdir()
if Path(self._path / f"{name}.{version}.jinja") not in [pf.path for pf in self._index.files]:
raise ValueError(
f"Prompt {name}.{version}.jinja not found in the index. " f"Cannot set meta for a non-existing prompt."
f"Prompt {name}.{version}.jinja not found in the index. Cannot set meta for a non-existing prompt."
)

if f"{name}:{version}.json" in self._meta_path.glob("*.json"):
if not overwrite:
raise ValueError(
f"Meta file for prompt {name}:{version} already exists. " f"Use overwrite=True to overwrite."
f"Meta file for prompt {name}:{version} already exists. Use overwrite=True to overwrite."
)
meta_path = self._meta_path / f"{name}.{version}.json"
meta_path.write_text(json.dumps(meta))

0 comments on commit 54681ab

Please sign in to comment.