From b518e5b63b6b3691ccf73a382cadea1ecc64c764 Mon Sep 17 00:00:00 2001 From: Rhys Goodall Date: Thu, 11 Jun 2026 08:17:19 -0400 Subject: [PATCH 1/2] use ty pre-commit hook --- .github/workflows/lint.yml | 5 ----- .pre-commit-config.yaml | 9 ++------- pyproject.toml | 2 ++ 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b51ab6559..3c17bc5a8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,10 +13,5 @@ jobs: - name: Check out repo uses: actions/checkout@v5 - - name: Set up uv - uses: astral-sh/setup-uv@v6 - with: - enable-cache: true - - name: Run prek uses: j178/prek-action@v1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a14a75748..681f386f6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,12 +36,7 @@ repos: # MD034: bare URL used args: [--disable, MD013, MD033, MD041, MD034, "--"] - - repo: local + - repo: https://github.com/astral-sh/ty-pre-commit + rev: v0.0.48 hooks: - id: ty - name: ty check - entry: env -u VIRTUAL_ENV UV_PROJECT_ENVIRONMENT=.venv_prek uv run --extra test --extra docs ty check - language: python - additional_dependencies: [uv] - types: [python] - pass_filenames: false diff --git a/pyproject.toml b/pyproject.toml index 55615ddaa..93c3286f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -148,6 +148,7 @@ markers = [ ] [tool.uv] +default-groups = ["dev", "typecheck"] # make these dependencies mutually exclusive since they use incompatible e3nn versions # see https://docs.astral.sh/uv/concepts/projects/config/#conflicting-dependencies for more details conflicts = [ @@ -179,6 +180,7 @@ conflicts = [ [dependency-groups] dev = ["prek>=0.3.4", "ty>=0.0.19"] +typecheck = ["torch-sim-atomistic[docs,test]"] [tool.ty.rules] unused-ignore-comment = "warn" From c5748ab24107fc133404836ad0ef480877e90f0b Mon Sep 17 00:00:00 2001 From: Rhys Goodall Date: Sun, 14 Jun 2026 14:12:46 -0400 Subject: [PATCH 2/2] fix? --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 681f386f6..a562c576b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,3 +40,4 @@ repos: rev: v0.0.48 hooks: - id: ty + args: [--only-group, typecheck]