Skip to content

Commit a90868e

Browse files
niksirbiclaude
andauthored
Enable pre-commit.ci and configure mypy (#61)
* Enable pre-commit.ci and skip mypy Applies the same pre-commit.ci config as for `movement`. I've also enabled the pre-commit.ci app in GitHub settings. * Add pandas-stubs and xarray to mypy pre-commit deps poseinterface imports pandas and xarray directly, so the mypy hook needs their type stubs to perform real type checking (mirrors the typed deps added in movement#721). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * mention pre-commit.ci in contributing guide --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent c64a6b1 commit a90868e

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ exclude: 'conf.py'
33
# Configuring https://pre-commit.ci/
44
ci:
55
autoupdate_schedule: monthly
6+
skip: [mypy] # Build exceeds tier max size 250MiB
67

78
repos:
89
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -29,7 +30,9 @@ repos:
2930
hooks:
3031
- id: mypy
3132
additional_dependencies:
33+
- pandas-stubs
3234
- types-setuptools
35+
- xarray
3336
- repo: https://github.com/mgedmin/check-manifest
3437
rev: "0.50"
3538
hooks:

docs/source/contributing.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ git add .
4444
pre-commit run
4545
```
4646

47+
These hooks also run automatically on every pull request via
48+
[pre-commit.ci](https://pre-commit.ci/) (except `mypy`, which is skipped there
49+
but still runs locally and in the test workflow). If a hook auto-fixes
50+
something, the bot will push the fix to your branch, so remember to pull before
51+
continuing to work.
52+
4753
If a problem cannot be auto-fixed, the corresponding tool will provide
4854
information on what the issue is and how to fix it. For example, `ruff` might
4955
output something like:

0 commit comments

Comments
 (0)