Skip to content

fix: exclude tooling from mypy check#748

Merged
planetf1 merged 1 commit intogenerative-computing:mainfrom
planetf1:mypygriffe2
Mar 26, 2026
Merged

fix: exclude tooling from mypy check#748
planetf1 merged 1 commit intogenerative-computing:mainfrom
planetf1:mypygriffe2

Conversation

@planetf1
Copy link
Copy Markdown
Contributor

@planetf1 planetf1 commented Mar 26, 2026

Misc PR

Type of PR

  • Bug Fix
  • New Feature
  • Documentation
  • Other

Description

  • Link to Issue: Fixes

Updates mypy configuration to exclude doc tooling

Fixes #747

Our pre-commit runs mypy which validates types and therefore needs to have all dependencies available for the code it is checking. Since griffe (used by docs pipeline) is only in the 'dev' group, and we only use 'uv run' for mypy, it will not have access to those dependencies.

An alternative option is ensuring mypy check installs/syncs all optional dependencies including dev. However this is a bigger decision - it has more impact, so I am not proposing that here (aside: this mypy issue may occur in other areas .. we may need to consider this in future)

Additionally I've moved the exclusion into pyproject.toml which allows the invocation in pre-commit to not have to specify additional excludes & keeps the config consistent

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code as added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
@github-actions github-actions bot added the bug Something isn't working label Mar 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

The PR description has been updated. Please fill out the template for your PR to be reviewed.

@mergify
Copy link
Copy Markdown

mergify bot commented Mar 26, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|release)(?:\(.+\))?:

@planetf1 planetf1 marked this pull request as ready for review March 26, 2026 11:07
@planetf1 planetf1 requested a review from a team as a code owner March 26, 2026 11:07
@planetf1 planetf1 added this pull request to the merge queue Mar 26, 2026
Merged via the queue into generative-computing:main with commit b9a8684 Mar 26, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mypy complains about griffe during precommit

2 participants