repowiselitestar-org/litestar

Code health of litestar-org/litestar

Repowise scores litestar-org/litestar at 8.7 out of 10 for code health, which reads as excellent, alongside maintainability 9.3 and static performance 9.9 on the same scale. There are 640 open findings across the three pillars, and the lowest-scoring file is app.py at 1.0. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.

Findings by severity

34 critical, 156 high, 243 medium, 207 low.

Hotspots

10 files are flagged as hotspots. The top 5:

  • litestar/_kwargs/kwargs_model.py: 5 commits in the last 90 days from 14 contributors with 4 recent bug fixes
  • tests/unit/test_openapi/test_schema.py: 8 commits in the last 90 days from 23 contributors with 7 recent bug fixes
  • tests/unit/test_kwargs/test_reserved_kwargs_injection.py: 3 commits in the last 90 days from 8 contributors with 3 recent bug fixes
  • tests/unit/test_openapi/test_parameters.py: 4 commits in the last 90 days from 15 contributors with 3 recent bug fixes
  • litestar/typing.py: 4 commits in the last 90 days from 8 contributors with 5 recent bug fixes

Lowest-scoring files

  • litestar/app.py: 1.0 out of 10 with 1 bug fix in the last 180 days
  • litestar/_openapi/schema_generation/schema.py: 1.0 out of 10 with 6 bug fixes in the last 180 days
  • litestar/handlers/http_handlers/base.py: 1.2 out of 10
  • litestar/_kwargs/kwargs_model.py: 3.2 out of 10 with 4 bug fixes in the last 180 days
  • tests/unit/test_cli/test_core_commands.py: 3.4 out of 10

Checked against bug fixes

Of the 20 files Repowise scores lowest, 13 had a bug fix in the last 180 days. Across all 1,135 scored files, 7.3% had a bug fix in that window.

Dead code and refactoring

Repowise found 20 unused exports. 23 refactoring targets across 23 files would raise the score.

More on litestar: summary and FAQ, codebase overview, architecture.