From d44669796fe9ea1b810d9299d260236bb133c681 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 15 Jul 2026 15:13:29 +0000 Subject: [PATCH] feature: CD-84 add pre-commit configuration (black + darglint) Co-Authored-By: Bobby Nobakht --- .pre-commit-config.yaml | 12 ++++++++++++ README.md | 10 ++++++++++ 2 files changed, 22 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..994d37827 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,12 @@ +repos: + - repo: https://github.com/psf/black + rev: 24.8.0 + hooks: + - id: black + files: ^src/ + - repo: https://github.com/terrencepreilly/darglint + rev: v1.8.1 + hooks: + - id: darglint + files: ^src/ + args: ["-v", "2", "-z", "short"] diff --git a/README.md b/README.md index 8397c6053..5fe77cd80 100644 --- a/README.md +++ b/README.md @@ -286,6 +286,16 @@ Here's a list of relevant env. variables that are used by AgentLab: - `AGENTLAB_EXP_ROOT`, desired path for your experiments to be stored, defaults to `~/agentlab-results`. - `AGENTXRAY_SHARE_GRADIO`, which prompts AgentXRay to open a public tunnel on launch. +## Contributing + +For development, install the dev extras and the pre-commit hooks so formatting +(black) and docstring checks (darglint) run automatically before each commit: + +```bash +pip install -e ".[dev]" +pre-commit install +``` + ## Misc if you want to download HF models more quickly