style: apply ruff auto-fixes
This commit is contained in:
18
scripts/remove_old_executor.py
Normal file
18
scripts/remove_old_executor.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
from pathlib import Path
|
||||
p = Path(r"c:\Forgejo\Medios-Macina\CLI.py")
|
||||
s = p.read_text(encoding='utf-8')
|
||||
start = s.find('\nif False:')
|
||||
if start == -1:
|
||||
print('No if False found')
|
||||
else:
|
||||
after = s[start+1:]
|
||||
idx = after.find('\nfrom rich.markdown import Markdown')
|
||||
if idx == -1:
|
||||
print('No subsequent import found')
|
||||
else:
|
||||
before = s[:start]
|
||||
rest = after[idx+1:]
|
||||
new = before + '\nfrom rich.markdown import Markdown\n' + rest
|
||||
p.write_text(new, encoding='utf-8')
|
||||
print('Removed legacy block')
|
||||
Reference in New Issue
Block a user