forked from apple/ToolSandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
31 lines (31 loc) · 952 Bytes
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [ '--unsafe' ] # checks syntax without loading yaml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.0
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: local
# Getting mypy to work in pre-commit have always been tricky
# pre-commit/mirrors-mypy isn't good enough since its env and config
# could differ with local environment, leading to unexpected behavior.
# Here we use the mypy installed in local env instead
hooks:
- id: mypy
name: mypy
entry: mypy
language: python
types: [ python ]
require_serial: true
verbose: true