diff options
author | 2019-05-30 02:01:33 -0700 | |
---|---|---|
committer | 2019-05-30 02:01:33 -0700 | |
commit | 4deb784129f1e2c1cdadbe1c27c2be4b404a69dd (patch) | |
tree | fc811a2133a74dc67de598fc652bf69c20fda688 | |
parent | Add flake8 plugin to only allow double quotes (diff) |
Fix pre-commit configuration
Excluded files and directories in the flake8 config file are overwritten
by the --files argument, which is considered intended behaviour.
However, this is problematic due to pre-commit's reliance on the
--files argument. Therefore, pre-commit's own exclude config option
must be leveraged.
* Properly exclude tests directory
* Add flake8 plugins as dependencies so that they are actually used
-rw-r--r-- | .pre-commit-config.yaml | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1d75342..5d2d40a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,4 +2,17 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.0.0 hooks: - - id: flake8
\ No newline at end of file + - id: flake8 + args: [--config=.flake8] + exclude: ^tests/ + additional_dependencies: [ + flake8-docstrings, + flake8-bugbear, + flake8-import-order, + flake8-tidy-imports, + flake8-todo, + flake8-string-format, + flake8-formatter-junit-xml, + flake8-quotes + ] + |