Skip to content

fix: Resolve ruff B904 errors + cleanup unused imports#35

Merged
iamh2o merged 1 commit intomainfrom
fix/ruff-b904-cleanup
Feb 8, 2026
Merged

fix: Resolve ruff B904 errors + cleanup unused imports#35
iamh2o merged 1 commit intomainfrom
fix/ruff-b904-cleanup

Conversation

@iamh2o
Copy link
Contributor

@iamh2o iamh2o commented Feb 8, 2026

Summary

Fix all 26 B904 ruff errors (exception chaining) plus auto-fix unused imports and formatting.

Changes

B904 Exception Chaining (25 fixes)

  • zebra_day/backends/dynamo.py (2): from None on VersionConflictError raises
  • zebra_day/cli/dynamo.py (13): from exc on typer.Exit(1) raises
  • zebra_day/web/routers/api.py (10): from exc/from None on HTTPException raises

Auto-fixes (13)

  • Removed unused imports in test files (os, Path, boto3, platform, pytest, PropertyMock)
  • Sorted imports in web/app.py
  • Added missing newline at EOF in test_cli_dynamo.py
  • Removed unused variable sts in backends/dynamo.py

Formatting

  • 7 files reformatted via ruff format

Verification

  • ruff check zebra_day tests
  • ruff format --check zebra_day tests
  • pytest tests/ -v --tb=short334/334 pass

Pull Request opened by Augment Code with guidance from the PR author

- Add 'from exc' to Exception raises in except blocks (cli/dynamo, web/api)
- Add 'from None' to ImportError raises (intentional suppression)
- Add 'from None' to VersionConflictError raises (backends/dynamo)
- Remove unused imports in test files (os, Path, boto3, platform, pytest, PropertyMock)
- Fix unsorted imports in web/app.py
- Reformat 7 files via ruff format
- All 334 tests pass, ruff check + format clean
@iamh2o iamh2o merged commit 14a5003 into main Feb 8, 2026
3 of 12 checks passed
@iamh2o iamh2o deleted the fix/ruff-b904-cleanup branch February 8, 2026 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant