diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 97c1afbcc182e075ae0d882adfa241b28ffd6569..5782dfa14fe7d0d09f9bb7abf296b60d05b048dc 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 4741fb4f3bbc6681088cf9e960321e7b857a93a8..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..e9513d0648ba1ff927024c693ef635154b41ca0c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,4 @@ +[tool.black] +exclude = "build" +line-length = 80 +skip-string-normalization = true