style: ruff format

This commit is contained in:
Igor Lins e Silva
2026-04-12 22:20:27 -03:00
parent c383523768
commit 22328540e1
2 changed files with 12 additions and 4 deletions
+6 -2
View File
@@ -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")
+6 -2
View File
@@ -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: