Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 0 additions & 104 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,116 +55,12 @@ repos:
- id: typos
args: [--force-exclude]
# For Python files
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.1.0
hooks:
- id: black
exclude: |
(?x)^(
ci/.+

| cmake/.+

| r/.+

| paddle/scripts/.+

| setup.py

| paddle/.+

| python/paddle/[a-c].+

| python/paddle/de.+

| python/paddle/distributed/a.+

| python/paddle/distributed/[b-e].+

| python/paddle/distributed/f.+

| python/paddle/distributed/[g-z].+

| python/paddle/[e-i].+

| python/paddle/j.+

| python/paddle/[k-n].+

| python/paddle/[o-t].+

| python/paddle/[u-z].+

| python/_.+

| test/a.+

| test/[b-h].+

| test/[i-k].+

| test/l.+

| test/[m-z].+

| tools/.+
)$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.0
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix, --no-cache]
- id: ruff-format
exclude: |
(?x)^(
# ci/.+

# | cmake/.+

# | r/.+

# | paddle/scripts/.+

# | setup.py

# | paddle/.+

# | python/paddle/[a-c].+

# | python/paddle/de.+

# | python/paddle/distributed/a.+

# | python/paddle/distributed/[b-e].+

# | python/paddle/distributed/f.+

# | python/paddle/distributed/[g-z].+

# | python/paddle/[e-i].+

# | python/paddle/j.+

# | python/paddle/[k-n].+

# | python/paddle/[o-t].+

# | python/paddle/[u-z].+

# | python/_.+

# | test/a.+

# | test/[b-h].+

# | test/[i-k].+

# | test/l.+

# | test/[m-z].+

# | tools/.+
)$
# For C++ files
- repo: local
hooks:
Expand Down
13 changes: 1 addition & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
[tool.black]
line-length = 80
skip-string-normalization = true
target-version = ["py39", "py310", "py311", "py312", "py313"]
extend-exclude = '''
(
third_party/.+ # Exclude third_party directory
| build/.+ # Exclude build directory
)
'''

[tool.ruff]
exclude = [
"./build",
Expand Down Expand Up @@ -126,7 +115,7 @@ unfixable = [
"NPY001"
]
ignore = [
# Whitespace before ‘,’, ‘;’, or ‘:’, it is not compatible with black
# Whitespace before ‘,’, ‘;’, or ‘:’, it is not compatible with ruff format
"E203",
# Module level import not at top of file
"E402",
Expand Down