From 8f9baafac1ebc97df7f49407e21e9d44d2988961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 5 Dec 2022 00:12:37 +0200 Subject: [PATCH] Tweak black config (#83230) * Remove `--safe` from pre-commit args, it's the default * Extend exclusions instead of overriding, improve regex --- .pre-commit-config.yaml | 1 - pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f7b1e54d0a4..5ec11b93926 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,6 @@ repos: hooks: - id: black args: - - --safe - --quiet files: ^((homeassistant|pylint|script|tests)/.+)?[^/]+\.py$ - repo: https://github.com/codespell-project/codespell diff --git a/pyproject.toml b/pyproject.toml index d59713224c6..37e6f66f687 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ include = ["homeassistant*"] [tool.black] target-version = ["py39", "py310"] -exclude = 'generated' +extend-exclude = "/generated/" [tool.isort] # https://github.com/PyCQA/isort/wiki/isort-Settings