This repository has been archived by the owner on Oct 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pre-commit.ci] pre-commit autoupdate (#1446)
- Loading branch information
1 parent
a00a6f2
commit d1fdcdd
Showing
730 changed files
with
6,634 additions
and
1,702 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,11 +45,10 @@ repos: | |
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
args: | ||
[-w, --ignore-words=.github/workflows/script/formatScan/nlp_dict.txt] | ||
args: [-w, --ignore-words=.github/workflows/script/formatScan/nlp_dict.txt] | ||
exclude: | | ||
(?x)^( | ||
.+.po|.+.ts|.+.js|.+.map|.+.js.map|.+.css.map| | ||
.+.po|.+.map|.+.js.map|.+.css.map| | ||
.github/workflows/script/formatScan/nlp_dict.txt| | ||
docker/third_party_programs_docker.txt| | ||
intel_extension_for_transformers/transformers/llm/evaluation/hf_eval/datasets/cnn_validation.json| | ||
|
@@ -61,14 +60,12 @@ repos: | |
)$ | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.5.4 | ||
rev: v1.5.5 | ||
hooks: | ||
- id: insert-license | ||
files: | | ||
(?x)^( | ||
intel_extension_for_transformers/.*(py|yaml|yml|sh)| | ||
workflows/.*(py|yaml|yml|sh)| | ||
tests/.*(py|yaml|yml|sh) | ||
(intel_extension_for_transformers|workflows|tests)/.*(py|yaml|yml|sh) | ||
)$ | ||
args: | ||
[ | ||
|
@@ -77,64 +74,105 @@ repos: | |
--detect-license-in-X-top-lines=40, | ||
--skip-license-insertion-comment=Copyright, | ||
] | ||
# - repo: https://github.com/asottile/yesqa | ||
# rev: v1.5.0 | ||
# hooks: | ||
# - id: yesqa | ||
# name: Unused noqa | ||
# | ||
# - repo: https://github.com/pycqa/isort | ||
# rev: 5.13.2 | ||
# hooks: | ||
# - id: isort | ||
# exclude: | | ||
# (?x)^( | ||
# examples/.+ | ||
# )$ | ||
# | ||
# - repo: https://github.com/PyCQA/docformatter | ||
# rev: v1.7.5 | ||
# hooks: | ||
# - id: docformatter | ||
# args: [ | ||
# --in-place, | ||
# --wrap-summaries=0, # 0 means disable wrap | ||
# --wrap-descriptions=0, # 0 means disable wrap | ||
# --black, | ||
# --style=google, | ||
# ] | ||
# exclude: | | ||
# (?x)^( | ||
# examples/.+ | ||
# )$ | ||
# | ||
# - repo: https://github.com/psf/black.git | ||
# rev: 23.12.1 | ||
# hooks: | ||
# - id: black | ||
# files: (.*\.py)$ | ||
# exclude: | | ||
# (?x)^( | ||
# examples/.+ | ||
# )$ | ||
# | ||
# - repo: https://github.com/asottile/blacken-docs | ||
# rev: 1.16.0 | ||
# hooks: | ||
# - id: blacken-docs | ||
# args: [--line-length=120, --skip-errors] | ||
# exclude: | | ||
# (?x)^( | ||
# examples/.+| | ||
# docs/source-app | ||
# )$ | ||
# | ||
# - repo: https://github.com/astral-sh/ruff-pre-commit | ||
# rev: v0.1.9 | ||
# hooks: | ||
# - id: ruff | ||
# args: [--fix, --exit-non-zero-on-fix, --no-cache] | ||
# exclude: | | ||
# (?x)^( | ||
# examples/.+ | ||
# )$ | ||
- id: insert-license | ||
files: | | ||
(?x)^( | ||
(intel_extension_for_transformers|workflows|tests)/.*(ts|js|cpp|hpp) | ||
)$ | ||
args: | ||
[ | ||
--license-filepath=.github/license_template.txt, | ||
--use-current-year, | ||
--detect-license-in-X-top-lines=40, | ||
--skip-license-insertion-comment=Copyright, | ||
--comment-style=//, | ||
] | ||
- id: insert-license | ||
files: | | ||
(?x)^( | ||
(intel_extension_for_transformers|workflows|tests)/.*(html|svelte) | ||
)$ | ||
args: | ||
[ | ||
--license-filepath=.github/license_template.txt, | ||
--use-current-year, | ||
--detect-license-in-X-top-lines=40, | ||
--skip-license-insertion-comment=Copyright, | ||
--comment-style=<!--| |-->, | ||
] | ||
|
||
- repo: https://github.com/asottile/yesqa | ||
rev: v1.5.0 | ||
hooks: | ||
- id: yesqa | ||
name: Unused noqa | ||
|
||
# - repo: https://github.com/pycqa/isort | ||
# rev: 5.13.2 | ||
# hooks: | ||
# - id: isort | ||
# args: [--profile=black, --line-length=120] | ||
# exclude: | | ||
# (?x)^( | ||
# examples/.+| | ||
# .*\__init__.py | ||
# )$ | ||
|
||
# - repo: https://github.com/pre-commit/mirrors-prettier | ||
# rev: "v4.0.0-alpha.8" # Use the sha / tag you want to point at | ||
# hooks: | ||
# - id: prettier | ||
# args: [--print-width=120] | ||
# types_or: [yaml, html, css, scss, javascript, json, ts] | ||
# additional_dependencies: | ||
# - [email protected] | ||
|
||
- repo: https://github.com/PyCQA/docformatter | ||
rev: v1.7.5 | ||
hooks: | ||
- id: docformatter | ||
args: [ | ||
--in-place, | ||
--wrap-summaries=0, # 0 means disable wrap | ||
--wrap-descriptions=0, # 0 means disable wrap | ||
--black, | ||
--style=google, | ||
] | ||
exclude: | | ||
(?x)^( | ||
examples/.+ | ||
)$ | ||
# - repo: https://github.com/psf/black.git | ||
# rev: 24.3.0 | ||
# hooks: | ||
# - id: black | ||
# files: (.*\.py)$ | ||
# args: [--line-length=120] | ||
# exclude: | | ||
# (?x)^( | ||
# examples/.+ | ||
# )$ | ||
|
||
# - repo: https://github.com/asottile/blacken-docs | ||
# rev: 1.16.0 | ||
# hooks: | ||
# - id: blacken-docs | ||
# args: [--line-length=120, --skip-errors] | ||
# additional_dependencies: | ||
# - black==24.3.0 | ||
# exclude: | | ||
# (?x)^( | ||
# examples/.+| | ||
# docs/source-app | ||
# )$ | ||
|
||
# - repo: https://github.com/astral-sh/ruff-pre-commit | ||
# rev: v0.3.5 | ||
# hooks: | ||
# - id: ruff | ||
# args: [--fix, --exit-non-zero-on-fix, --no-cache] | ||
# exclude: | | ||
# (?x)^( | ||
# examples/.+ | ||
# )$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Exclude a variety of commonly ignored directories. | ||
exclude = [ | ||
".bzr", | ||
".direnv", | ||
".eggs", | ||
".git", | ||
".git-rewrite", | ||
".hg", | ||
".ipynb_checkpoints", | ||
".mypy_cache", | ||
".nox", | ||
".pants.d", | ||
".pyenv", | ||
".pytest_cache", | ||
".pytype", | ||
".ruff_cache", | ||
".svn", | ||
".tox", | ||
".venv", | ||
".vscode", | ||
"__pypackages__", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"node_modules", | ||
"site-packages", | ||
"venv", | ||
] | ||
|
||
# Same as Black. | ||
line-length = 120 | ||
indent-width = 4 | ||
|
||
# Assume Python 3.10 | ||
target-version = "py310" | ||
|
||
[lint] | ||
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. | ||
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or | ||
# McCabe complexity (`C901`) by default. | ||
select = ["E4", "E7", "E9", "F"] | ||
ignore = [ | ||
"E402", # Module level import not at top of file | ||
"E501", # Line too long (121 > 120 characters) | ||
"E721", # Do not compare types, use isinstance() | ||
"E722", # Do not use bare except | ||
"E731", # Do not assign a lambda expression, use a def | ||
"E741", # Do not use variables named ‘l’, ‘O’, or ‘I’ | ||
"F401", # {name} imported but unused | ||
"F403", # from {name} import * used; unable to detect undefined names | ||
"F405", # {name} may be undefined, or defined from star imports | ||
"F841", # Local variable is assigned to but never used{name} | ||
] | ||
|
||
# Allow fix for all enabled rules (when `--fix`) is provided. | ||
fixable = ["ALL"] | ||
unfixable = [] | ||
|
||
# Allow unused variables when underscore-prefixed. | ||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | ||
|
||
[format] | ||
# Like Black, use double quotes for strings. | ||
quote-style = "double" | ||
|
||
# Like Black, indent with spaces, rather than tabs. | ||
indent-style = "space" | ||
|
||
# Like Black, respect magic trailing commas. | ||
skip-magic-trailing-comma = false | ||
|
||
# Like Black, automatically detect the appropriate line ending. | ||
line-ending = "auto" | ||
|
||
# Enable auto-formatting of code examples in docstrings. Markdown, | ||
# reStructuredText code/literal blocks and doctests are all supported. | ||
# | ||
# This is currently disabled by default, but it is planned for this | ||
# to be opt-out in the future. | ||
docstring-code-format = false | ||
|
||
# Set the line length limit used when formatting code snippets in | ||
# docstrings. | ||
# | ||
# This only has an effect when the `docstring-code-format` setting is | ||
# enabled. | ||
docstring-code-line-length = "dynamic" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.