forked from flagos-ai/FlagScale
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
63 lines (62 loc) · 1.78 KB
/
.pre-commit-config.yaml
File metadata and controls
63 lines (62 loc) · 1.78 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
exclude: |
(?x)^(
flagscale/train/megatron/.*|
flagscale/train/train.*\.py|
flagscale/models/megatron/.*|
tools/checkpoint/loader.*\.py|
tools/checkpoint/saver.*\.py|
tools/checkpoint/qwen3_engram/modeling_hf/.*|
examples/aquila/tokenizer*|
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.0
hooks:
- id: ruff-check
args: [--output-format, github, --fix]
- id: ruff-format
- repo: https://github.com/crate-ci/typos
rev: v1.38.1
hooks:
- id: typos
args: [--force-exclude]
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.11.1
# hooks:
# - id: mypy
# args: [--python-version=3.10]
# additional_dependencies:
# - regex
# - types-cachetools
# - types-setuptools
# - types-PyYAML
# - types-requests
# - types-torch
# - pydantic
# - repo: local
# hooks:
# - id: check-header
# name: check-header
# entry: python ./tools/codestyle/check_header.py
# language: python
# types: [python]
# exclude: |
# (?x)^(
# flagscale/backends/.*|
# megatron-energon/.*|
# hardware/.*\.patch|
# flagscale/train/train.*\.py|
# flagscale/train/models/.*|
# flagscale/train/hetero/.*|
# tools/checkpoint/loader.*\.py|
# tools/checkpoint/saver.*\.py|
# .*\.sh$ # Exclude all .sh files
# )$