Tweak black config (#83230)

* Remove `--safe` from pre-commit args, it's the default

* Extend exclusions instead of overriding, improve regex
This commit is contained in:
Ville Skyttä 2022-12-05 00:12:37 +02:00 committed by GitHub
parent 6c896adcff
commit 8f9baafac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -16,7 +16,6 @@ repos:
hooks: hooks:
- id: black - id: black
args: args:
- --safe
- --quiet - --quiet
files: ^((homeassistant|pylint|script|tests)/.+)?[^/]+\.py$ files: ^((homeassistant|pylint|script|tests)/.+)?[^/]+\.py$
- repo: https://github.com/codespell-project/codespell - repo: https://github.com/codespell-project/codespell

View File

@ -74,7 +74,7 @@ include = ["homeassistant*"]
[tool.black] [tool.black]
target-version = ["py39", "py310"] target-version = ["py39", "py310"]
exclude = 'generated' extend-exclude = "/generated/"
[tool.isort] [tool.isort]
# https://github.com/PyCQA/isort/wiki/isort-Settings # https://github.com/PyCQA/isort/wiki/isort-Settings