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