Skip to content

Conversation

@dguido
Copy link
Member

@dguido dguido commented Jan 26, 2026

Summary

  • Apply Trail of Bits modern-python best practices to project configuration
  • Configure ruff with select = ["ALL"] and explicit ignores for stricter linting
  • Add pytest-cov for coverage reporting with codecov integration
  • Add Makefile with standard targets for common operations

Changes

pyproject.toml:

  • Ruff: select = ["ALL"] with project-appropriate ignores
  • Added [tool.ruff.format] section
  • Added [tool.uv] with default-groups = ["dev"]
  • Added pytest-cov and coverage configuration

CI workflow:

  • Added --output-format=github to ruff for PR annotations
  • Added coverage reporting with codecov upload

Code fixes:

  • Added ClassVar annotations for mutable class attributes
  • Added return type annotations
  • Fixed timezone handling (Python 3.11+ handles "Z" natively)
  • Added ty: ignore comments for external library type issues

New files:

  • Makefile with targets: dev, lint, format, test, test-fast, build, clean

Test plan

  • make lint passes
  • make test passes

🤖 Generated with Claude Code

Apply Trail of Bits modern-python best practices:

- Configure ruff with select = ["ALL"] and explicit ignores
- Add pytest-cov for coverage reporting
- Add Makefile with standard targets (dev, lint, format, test, build)
- Update CI to use github output format for PR annotations
- Add coverage upload to codecov
- Fix ClassVar annotations for mutable class attributes
- Fix timezone handling (Python 3.11+ handles "Z" natively)
- Add ty: ignore comments for external library type issues

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dguido dguido force-pushed the modernize-python-tooling branch from eda1da9 to 5ccc51c Compare January 26, 2026 22:42
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.

2 participants