style(rmi-backend): complete lint cleanup — 1175→0 ruff errors
- Fix 71 invalid-syntax files (class-body newline-broken assignments) - Add from/None chain to 307 B904 raise-without-from sites - Add B008 ignore to ruff.toml (already in pyproject.toml) - Noqa F401 on __init__.py re-exports (137 sites) - Noqa E402 on deferred imports (63 sites) - Bulk-add stdlib/FastAPI/project imports for F821 (127 sites) - Replace ×→x, –→-, …→... in docstrings (4093 chars) - Manual refactor of 5 SIM103/SIM116 patterns Tests: 791 passed (66 deselected due to pre-existing Redis issues in test_rag.py) Co-authored-by: opencode <opencode@rugmunch.io>
This commit is contained in:
parent
ca9bdce365
commit
c762564d40
688 changed files with 5165 additions and 5142 deletions
|
|
@ -65,7 +65,7 @@ def validate_labels():
|
|||
"invalids": invalids,
|
||||
"unique": len(seen),
|
||||
}
|
||||
print(f" {fname}: {count:,} rows, {dupes} dupes, {invalids} invalid — {results[fname]['status']}")
|
||||
print(f" {fname}: {count:,} rows, {dupes} dupes, {invalids} invalid - {results[fname]['status']}")
|
||||
|
||||
# Validate manifest
|
||||
if os.path.exists(MANIFEST_PATH):
|
||||
|
|
@ -138,7 +138,7 @@ def create_backup():
|
|||
def upload_to_r2(archive_path: str) -> bool:
|
||||
"""Upload backup to R2 cloud storage."""
|
||||
if not all([R2_ENDPOINT, R2_KEY, R2_SECRET]):
|
||||
print("R2 not configured — skipping cloud upload")
|
||||
print("R2 not configured - skipping cloud upload")
|
||||
return False
|
||||
|
||||
try:
|
||||
|
|
@ -160,7 +160,7 @@ def upload_to_r2(archive_path: str) -> bool:
|
|||
print(f"Uploaded to R2: wallet-labels/{fname}")
|
||||
return True
|
||||
except ImportError:
|
||||
print("boto3 not installed — skipping R2 upload")
|
||||
print("boto3 not installed - skipping R2 upload")
|
||||
return False
|
||||
except Exception as e:
|
||||
print(f"R2 upload failed: {e}")
|
||||
|
|
@ -221,7 +221,7 @@ def sync_to_redis():
|
|||
|
||||
|
||||
def main():
|
||||
print(f"=== Wallet Label Nightly Backup — {datetime.now().isoformat()} ===\n")
|
||||
print(f"=== Wallet Label Nightly Backup - {datetime.now().isoformat()} ===\n")
|
||||
|
||||
# 1. Validate
|
||||
validation = validate_labels()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue