Open
Conversation
Introduce a [tool.mypy] section in pyproject.toml mirroring the configuration used in ingadhoc-odoo-saas-adhoc, plus no-redef disabled to accommodate the common Odoo pattern of extending a class with the same name. Add a matching mypy.yml workflow that runs `mypy .` on pushes and pull_request_target against 18.0+ branches. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds baseline mypy configuration and CI workflow to the template so downstream repos can run type-checking similarly to ingadhoc-odoo-saas-adhoc, including allowances for common Odoo patterns (e.g., class redefinition).
Changes:
- Add a
[tool.mypy]section topyproject.tomlwith project-default mypy settings. - Add a
mypy.ymlGitHub Actions workflow to runmypy .on pushes andpull_request_targetfor 18.0+ branches.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/pyproject.toml |
Introduces mypy configuration in the template’s central tooling config. |
src/.github/workflows/mypy.yml |
Adds a CI workflow to run mypy and post a commit status for PRs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+20
to
+26
| steps: | ||
| - | ||
| name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }} | ||
| - |
Comment on lines
+46
to
+52
| curl -L \ | ||
| -X POST \ | ||
| -H "Accept: application/vnd.github+json" \ | ||
| -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | ||
| -H "X-GitHub-Api-Version: 2022-11-28" \ | ||
| https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }} \ | ||
| -d '{"state":"${{ steps.mypy.outcome }}","context":"mergebot/mypy"}' \ |
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.
Introduce a [tool.mypy] section in pyproject.toml mirroring the configuration used in ingadhoc-odoo-saas-adhoc, plus no-redef disabled to accommodate the common Odoo pattern of extending a class with the same name. Add a matching mypy.yml workflow that runs
mypy .on pushes and pull_request_target against 18.0+ branches.