pre-commit: ship default and full configs (#28463)
For now, the only difference between the two is mypy.
This commit is contained in:
1 parent
b8fa5367db
commit
a8dff2f2d0
6 files changed
+56
-21
No files matched your search
@@ -0,0 +1,42 @@
|
||||
# This configuration includes the full set of hooks we use. In
|
||||
# addition to the defaults (see .pre-commit-config.yaml), this
|
||||
# includes hooks that require our development and test dependencies
|
||||
# installed and the virtualenv containing them active by the time
|
||||
# pre-commit runs to produce correct results.
|
||||
#
|
||||
# If this is not a problem for your workflow, using this config is
|
||||
# recommended, install it with
|
||||
# pre-commit install --config .pre-commit-config-all.yaml
|
||||
# Otherwise, see the default .pre-commit-config.yaml for a lighter one.
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 19.10b0
|
||||
hooks:
|
||||
- id: black
|
||||
args:
|
||||
- --safe
|
||||
- --quiet
|
||||
files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$
|
||||
- repo: https://gitlab.com/pycqa/flake8
|
||||
rev: 3.7.8
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies:
|
||||
- flake8-docstrings==1.3.1
|
||||
- pydocstyle==4.0.0
|
||||
files: ^(homeassistant|script|tests)/.+\.py$
|
||||
# Using a local "system" mypy instead of the mypy hook, because its
|
||||
# results depend on what is installed. And the mypy hook runs in a
|
||||
# virtualenv of its own, meaning we'd need to install and maintain
|
||||
# another set of our dependencies there... no. Use the "system" one
|
||||
# and reuse the environment that is set up anyway already instead.
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: mypy
|
||||
name: mypy
|
||||
entry: mypy
|
||||
language: system
|
||||
types: [python]
|
||||
require_serial: true
|
||||
files: ^homeassistant/.+\.py$
|
||||
Reference in new issue
Block a user