Skip to content

Commit

Permalink
Add back pre commit
Browse files Browse the repository at this point in the history
  • Loading branch information
max-muoto committed Jan 28, 2025
1 parent de0a4a5 commit 0fadda6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions python/tach/hooks/pre_commit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from __future__ import annotations

from tach.constants import TOOL_NAME

template = """#!/bin/sh
# Pre-commit script that validates dependencies locally
set -e
{command}"""


def build_pre_commit_hook_content() -> str:
return template.format(command=f"{TOOL_NAME} check")

0 comments on commit 0fadda6

Please sign in to comment.