From 22328540e11fae2511a76d592bfda7268dd0f5ed Mon Sep 17 00:00:00 2001 From: Igor Lins e Silva <4753812+igorls@users.noreply.github.com> Date: Sun, 12 Apr 2026 22:20:27 -0300 Subject: [PATCH] style: ruff format --- mempalace/cli.py | 8 ++++++-- mempalace/query_sanitizer.py | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/mempalace/cli.py b/mempalace/cli.py index a73d25e..806abcc 100644 --- a/mempalace/cli.py +++ b/mempalace/cli.py @@ -204,7 +204,9 @@ def cmd_repair(args): print(" Nothing to repair.") return - if not confirm_destructive_action("Repair", palace_path, assume_yes=getattr(args, "yes", False)): + if not confirm_destructive_action( + "Repair", palace_path, assume_yes=getattr(args, "yes", False) + ): return # Extract all drawers in batches @@ -567,7 +569,9 @@ def main(): action="store_true", help="Show what would be migrated without changing anything", ) - p_migrate.add_argument("--yes", action="store_true", help="Skip confirmation for destructive changes") + p_migrate.add_argument( + "--yes", action="store_true", help="Skip confirmation for destructive changes" + ) sub.add_parser("status", help="Show what's been filed") diff --git a/mempalace/query_sanitizer.py b/mempalace/query_sanitizer.py index dda29a8..91d0ca2 100644 --- a/mempalace/query_sanitizer.py +++ b/mempalace/query_sanitizer.py @@ -70,7 +70,9 @@ def sanitize_query(raw_query: str) -> dict: def _strip_wrapping_quotes(candidate: str) -> str: candidate = candidate.strip() - while len(candidate) >= 2 and candidate[:1] in QUOTE_CHARS and candidate[-1:] in QUOTE_CHARS: + while ( + len(candidate) >= 2 and candidate[:1] in QUOTE_CHARS and candidate[-1:] in QUOTE_CHARS + ): candidate = candidate[1:-1].strip() if not candidate: return "" @@ -86,7 +88,9 @@ def sanitize_query(raw_query: str) -> dict: return candidate nested_fragments = [ - _strip_wrapping_quotes(frag) for frag in _SENTENCE_SPLIT.split(candidate) if frag.strip() + _strip_wrapping_quotes(frag) + for frag in _SENTENCE_SPLIT.split(candidate) + if frag.strip() ] for frag in reversed(nested_fragments): if MIN_QUERY_LENGTH <= len(frag) <= MAX_QUERY_LENGTH: