Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions gateway/platforms/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -2795,10 +2795,7 @@ def _protect_html(html_fragment: str) -> str:
result = re.sub(
r"\[([^\]]+)\]\(([^)]+)\)",
lambda m: _protect_html(
'<a href="{}">{}</a>'.format(
MatrixAdapter._sanitize_link_url(m.group(2)),
_html_escape(m.group(1)),
)
f'<a href="{MatrixAdapter._sanitize_link_url(m.group(2))}">{_html_escape(m.group(1))}</a>'
),
result,
)
Expand Down
2 changes: 1 addition & 1 deletion gateway/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -14016,7 +14016,7 @@ async def _flush_buffer() -> None:
else:
await adapter.send(
chat_id,
"❌ Hermes update failed (exit code {}).".format(exit_code),
f"❌ Hermes update failed (exit code {exit_code}).",
metadata=metadata,
)
logger.info("Update finished (exit=%s), notified %s", exit_code, session_key)
Expand Down
4 changes: 1 addition & 3 deletions hermes_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10076,9 +10076,7 @@ def cmd_profile(args):
print(f"{copied} bundled skills synced.")
else:
print(
"⚠ Skills could not be seeded. Run `{} update` to retry.".format(
name
)
f"⚠ Skills could not be seeded. Run `{name} update` to retry."
)

# Create wrapper alias
Expand Down
4 changes: 2 additions & 2 deletions hermes_cli/pairing.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def _cmd_approve(store, platform: str, code: str):
)
print(f" Lockout clears in ~{mins} minute(s).")
print(
" To reset sooner, delete the '_lockout:{0}' entry from "
"~/.hermes/platforms/pairing/_rate_limits.json\n".format(platform)
f" To reset sooner, delete the '_lockout:{platform}' entry from "
"~/.hermes/platforms/pairing/_rate_limits.json\n"
)
else:
print(f"\n Code '{code}' not found or expired for platform '{platform}'.")
Expand Down
4 changes: 2 additions & 2 deletions hermes_cli/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,8 +1092,8 @@ def discover_and_load(self, force: bool = False) -> None:
if not is_enabled:
loaded = LoadedPlugin(manifest=manifest, enabled=False)
loaded.error = (
"not enabled in config (run `hermes plugins enable {}` to activate)"
.format(lookup_key)
f"not enabled in config (run `hermes plugins enable {lookup_key}` to activate)"

)
self._plugins[lookup_key] = loaded
logger.debug(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ preview = true # required for PLW1514 (unspecified-encoding) — preview rule
# which silently corrupts any non-ASCII file content. We had three
# separate Windows sandbox regressions in one debug session before
# adding the explicit encoding. This rule keeps new code honest.
select = ["PLW1514"]
select = ["UP032", "PLW1514"]

[tool.ruff.lint.per-file-ignores]
# Tests can intentionally exercise locale-encoding edge cases.
Expand Down
2 changes: 1 addition & 1 deletion tools/skill_manager_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def _create_skill(name: str, content: str, category: str = None) -> Dict[str, An
result["category"] = category
result["hint"] = (
"To add reference files, templates, or scripts, use "
"skill_manage(action='write_file', name='{}', file_path='references/example.md', file_content='...')".format(name)
f"skill_manage(action='write_file', name='{name}', file_path='references/example.md', file_content='...')"
)
return result

Expand Down
Loading