You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[FIX] defer fastkit import until after sys.path bootstrap and close patch-coverage gaps
Fixes the two P1 findings raised by Codex on #52 and lifts the patch
coverage above the 89% threshold so the PR can proceed.
- scripts/inspect-templates.py, scripts/inspect-changed-templates.py:
import `fastapi_fastkit.backend.inspector` only after the sys.path
bootstrap runs, so the scripts work from a fresh checkout where the
package is not installed on the interpreter.
- tests/test_utils.py: cover the setup.py read-error branch in
`is_fastkit_project`, the malformed-pyproject text fallback (tool-section
hit, no-markers miss, and read-error path).
- tests/test_backends/test_main.py: cover the non-list `[project].dependencies`
guard in `_parse_pyproject_dependencies` and the no-trailing-newline
branch of `_ensure_pyproject_fastkit_markers`.
- tests/test_backends/test_inspector.py: cover the pyproject parse-error,
setup.py-tpl read-error, and no-sources-at-all branches of
`_check_dependencies`, plus the non-list and non-string-entry paths of
`_extract_pyproject_dependency_names`.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments