feat: enable mypy session for documentai-toolbox#16690
feat: enable mypy session for documentai-toolbox#16690chalmerlowe wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements the mypy type checking session in the noxfile.py, replacing a previous skip command. Feedback indicates that enabling this session immediately may cause CI failures due to existing type errors and recommends using a configuration file or adding error codes for better visibility. Additionally, the specified mypy version constraint was noted as referencing an unreleased version.
| session.run( | ||
| "mypy", | ||
| "-p", | ||
| "google.cloud.documentai_toolbox", | ||
| "--check-untyped-defs", | ||
| "--ignore-missing-imports", | ||
| *session.posargs, | ||
| ) |
There was a problem hiding this comment.
Enabling this session while it has 46 known errors will break the CI pipeline. To avoid blocking the build, consider keeping the session.skip() call until the errors are resolved, or providing a configuration file (e.g., mypy.ini) to ignore existing issues. Additionally, adding --show-error-codes is recommended to help categorize and fix the reported errors.
| # Enable mypy once this bug is fixed. | ||
| session.skip("Temporarily skip mypy. See issue 16014") | ||
| session.install( | ||
| "mypy<1.16.0", |
This PR enables the mypy session in noxfile.py for documentai-toolbox and aligns it with the GAPIC generator template. Currently, it fails with 46 errors. This is pushed to allow farming out the work to resolve these errors or for separate review.