Open
Conversation
9125c27 to
5adf88d
Compare
northdpole
requested changes
Mar 5, 2026
| @dataclass(eq=False) | ||
| class Code(Node): | ||
| doctype: Credoctypes = Credoctypes.Code | ||
| import re |
Collaborator
There was a problem hiding this comment.
is this a complete rewrite? how come? there shouldn't be any linting error here
Author
There was a problem hiding this comment.
Not a rewrite. The Code class itself is unchanged; import ordering/noise came from merge/reformat. 're' is required for CRE id validation (re.match at cre_defs.py:442), so there isn’t a lint issue to fix here.
Author
|
Hi @northdpole, Just checking in regarding Issue #13 (pre-commit hooks and failing checks). I opened a PR addressing this and incorporated the review feedback that was previously mentioned. Whenever you have time, I’d appreciate it if you could take another look and let me know if the changes align with what you had in mind. PR: #785 |
- Add black formatting hook - Add mypy strict type checking - Add Flask test hook - Enforce minimum 70% coverage - Fix pytest failures - Resolve mypy strict errors All pre-commit checks pass.
- Add black formatting hook - Add mypy strict type checking - Add Flask test hook - Resolve test failures and increase coverage to 86%+ (passes 70% threshold) - Fix all pytest failures (Passes successfully now) - Resolve mypy strict errors All pre-commit checks pass.
659b9f8 to
c1b6ede
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title
Fix Issue #13 – Implement pre-commit hooks, resolve pytest failures, and restore test coverage
Description
This PR resolves Issue #13 by implementing the required pre-commit hooks and fixing the issues that previously caused the hooks and tests to fail.
While implementing the hooks, several underlying issues in the test suite and codebase surfaced. These were resolved to ensure that all checks run successfully.
Changes Made
Added a .pre-commit-config.yaml to enforce repository quality checks before commits:
black for automatic code formatting
mypy --strict for static type checking
Flask test execution
Coverage validation (minimum threshold remains 70%, as defined in the repository)
Several tests were failing before the hooks could run successfully. These were debugged and corrected so that the entire test suite now runs successfully without failures.
Addressed strict typing errors across the codebase so that mypy --strict passes successfully.
Adjusted portions of the test setup and related files to ensure reliable execution across the test suite.
While the project requires a minimum coverage of 70%, the fixes improved coverage to approximately 86%, allowing the coverage check to pass comfortably.
Verification
The following commands were run locally to confirm that all checks pass:
pre-commit install
pre-commit run --all-files
Results:
Black formatting: Pass
Mypy strict checks: Pass
Flask tests: Pass
Coverage check: Pass (≈86%)
Notes
All hooks execute successfully when the project environment is properly set up (virtual environment activated and dependencies installed).
No functional behavior of the application was intentionally modified beyond what was necessary to resolve the failing tests and type errors.
Related Issue
Fixes #13