yusyus
85dfae19f1
style: Fix remaining lint issues - down to 11 errors (98% reduction)
...
Fixed all critical and high-priority ruff lint issues:
Exception Chaining (B904): 39 → 0 ✅
- Auto-fixed 29 with Python script
- Manually fixed 10 remaining cases
- Added 'from err' or 'from None' to all raise statements in except blocks
Unused Imports (F401): 5 → 0 ✅
- Removed unused chromadb.config.Settings import
- Removed unused fastapi.responses.JSONResponse import
- Added noqa comments for intentional availability-check imports
Syntax Errors: Fixed
- Fixed duplicate 'from None from None' in azure_storage.py
- Fixed undefined 'e' in embedding_pipeline.py
Results:
- Before: 447 errors
- Fixed: 436 errors (98% reduction!)
- Remaining: 11 errors (all minor style improvements)
Remaining non-critical issues:
- 3 SIM105: Could use contextlib.suppress (style)
- 3 SIM117: Multiple with statements (style)
- 2 ARG001: Unused function arguments (acceptable)
- 3 others: bare-except, collapsible-if, enumerate (minor)
These 11 remaining are code quality suggestions, not bugs or issues.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-02-08 13:00:44 +03:00
yusyus
51787e57bc
style: Fix 411 ruff lint issues (Kimi's issue #4 )
...
Auto-fixed lint issues with ruff --fix and --unsafe-fixes:
Issue #4 : Ruff Lint Issues
- Before: 447 errors (originally reported as ~5,500)
- After: 55 errors remaining
- Fixed: 411 errors (92% reduction)
Auto-fixes applied:
- 156 UP006: List/Dict → list/dict (PEP 585)
- 63 UP045: Optional[X] → X | None (PEP 604)
- 52 F401: Removed unused imports
- 52 UP035: Fixed deprecated imports
- 34 E712: True/False comparisons → not/bool()
- 17 F841: Removed unused variables
- Plus 37 other auto-fixable issues
Remaining 55 errors (non-critical):
- 39 B904: Exception chaining (best practice)
- 5 F401: Unused imports (edge cases)
- 3 SIM105: Could use contextlib.suppress
- 8 other minor style issues
These remaining issues are code quality improvements, not critical bugs.
Result: Code quality significantly improved (92% of linting issues resolved)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-02-08 12:46:38 +03:00