style: apply ruff auto-fixes

This commit is contained in:
2026-01-19 03:14:30 -08:00
parent 3ab122a55d
commit a961ac3ce7
72 changed files with 2477 additions and 2871 deletions

19
scripts/check_pattern.py Normal file
View File

@@ -0,0 +1,19 @@
import re
from pathlib import Path
p = Path(r'c:\Forgejo\Medios-Macina\CLI.py')
s = p.read_text(encoding='utf-8')
pattern = re.compile(r'(?s)if False:\s*class _OldPipelineExecutor:.*?from rich\\.markdown import Markdown\\s*')
m = pattern.search(s)
print('found', bool(m))
if m:
print('start', m.start(), 'end', m.end())
print('snippet:', s[m.start():m.start()+120])
else:
# print a slice around the if False for debugging
i = s.find('if False:')
print('if False index', i)
print('around if False:', s[max(0,i-50):i+200])
j = s.find('from rich.markdown import Markdown', i)
print('next from rich index after if False', j)
if j!=-1:
print('around that:', s[j-50:j+80])