From 6454133f26f38f5935e1ea58911ee82ea708b29e Mon Sep 17 00:00:00 2001 From: Nyakku Shigure Date: Mon, 24 Oct 2022 15:37:45 +0800 Subject: [PATCH] [CodeStyle] add black config to release2.4 (#47146) * [CodeStyle] add black config to release2.4 * empty commit, test=document_fix --- .pre-commit-config.yaml | 6 +++--- .style.yapf | 3 --- pyproject.toml | 4 ++++ 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .style.yapf create mode 100644 pyproject.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 97c1afbcc18..5782dfa14fe 100755 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,10 +4,10 @@ repos: hooks: - id: remove-crlf files: (?!.*third_party)^.*$ | (?!.*book)^.*$ -- repo: https://github.com/google/yapf - rev: v0.32.0 +- repo: https://github.com/psf/black.git + rev: 22.8.0 hooks: - - id: yapf + - id: black files: (.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$ exclude: | (?x)^( diff --git a/.style.yapf b/.style.yapf deleted file mode 100644 index 4741fb4f3bb..00000000000 --- a/.style.yapf +++ /dev/null @@ -1,3 +0,0 @@ -[style] -based_on_style = pep8 -column_limit = 80 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000000..e9513d0648b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,4 @@ +[tool.black] +exclude = "build" +line-length = 80 +skip-string-normalization = true -- GitLab