feat: devex help, add Makefile, ruff, pre-commit, and modernize CI

This commit is contained in:
Brooklyn Nicholson 2026-03-09 20:36:51 -05:00
parent 172a38c344
commit f4d7e6a29e
111 changed files with 11655 additions and 10200 deletions

View file

@ -12,8 +12,6 @@ import json
import os
import time
from pathlib import Path
from typing import Optional
CACHE_PATH = Path(os.path.expanduser("~/.hermes/sticker_cache.json"))
@ -43,7 +41,7 @@ def _save_cache(cache: dict) -> None:
)
def get_cached_description(file_unique_id: str) -> Optional[dict]:
def get_cached_description(file_unique_id: str) -> dict | None:
"""
Look up a cached sticker description.
@ -92,11 +90,11 @@ def build_sticker_injection(
"""
context = ""
if set_name and emoji:
context = f" {emoji} from \"{set_name}\""
context = f' {emoji} from "{set_name}"'
elif emoji:
context = f" {emoji}"
return f"[The user sent a sticker{context}~ It shows: \"{description}\" (=^.w.^=)]"
return f'[The user sent a sticker{context}~ It shows: "{description}" (=^.w.^=)]'
def build_animated_sticker_injection(emoji: str = "") -> str: