Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,12 @@ repos:
pass_filenames: false
args:
- check

- id: stubtest
name: python stubtest
language: python
additional_dependencies:
- mypy
entry: python ./scripts/stubtest.py
pass_filenames: false
always_run: true
1 change: 1 addition & 0 deletions scripts/bump_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# ruff: noqa
import re
import argparse
from pathlib import Path
Expand Down
15 changes: 15 additions & 0 deletions scripts/stubtest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ruff: noqa
import os
import subprocess
from pathlib import Path

ROOT_DIR = Path(__file__).parent.parent


def main():
subprocess.run(["maturin", "dev", "--uv"], cwd=ROOT_DIR, check=True)
os.execvpe("stubtest", ["--ignore-disjoint-bases", "natsrpy"], env=os.environ)


if __name__ == "__main__":
main()
Loading