From 314a5518f1b0043c74581970dceac20547b8615b Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Thu, 18 Mar 2021 23:20:25 +0100 Subject: [PATCH] Add python-typing-update to pre-commit-config (#48088) --- .pre-commit-config.yaml | 13 +++++++++++++ requirements_test_pre_commit.txt | 1 + 2 files changed, 14 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4ab91245b9e..ee4b5246100 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,6 +67,19 @@ repos: hooks: - id: prettier stages: [manual] + - repo: https://github.com/cdce8p/python-typing-update + rev: v0.3.0 + hooks: + # Run `python-typing-update` hook manually from time to time + # to update python typing syntax. + # Will require manual work, before submitting changes! + - id: python-typing-update + stages: [manual] + args: + - --py38-plus + - --force + - --keep-updates + files: ^(homeassistant|tests|script)/.+\.py$ - repo: local hooks: # Run mypy through our wrapper script in order to get the possible diff --git a/requirements_test_pre_commit.txt b/requirements_test_pre_commit.txt index 07f1efbc694..24c8bf3a7ff 100644 --- a/requirements_test_pre_commit.txt +++ b/requirements_test_pre_commit.txt @@ -7,5 +7,6 @@ flake8-docstrings==1.5.0 flake8==3.8.4 isort==5.7.0 pydocstyle==5.1.1 +python-typing-update==0.3.0 pyupgrade==2.7.2 yamllint==1.24.2