aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2019-05-30 03:19:34 -0700
committerGravatar MarkKoz <[email protected]>2019-05-30 03:19:34 -0700
commite75c764f693c3688a59af0d679e0d3e94f003503 (patch)
tree80dd8c51d5df8eed11d7ce2a0407322faad4edc3
parentFix pre-commit configuration (diff)
Lint tests
Tests ignore all D1xx warnings because tests shouldn't require docstrings.
-rw-r--r--.pre-commit-config.yaml16
-rw-r--r--tests/.flake815
2 files changed, 30 insertions, 1 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5d2d40a..4f97db9 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -3,6 +3,7 @@ repos:
rev: v2.0.0
hooks:
- id: flake8
+ name: Flake8 (snekbox)
args: [--config=.flake8]
exclude: ^tests/
additional_dependencies: [
@@ -15,4 +16,17 @@ repos:
flake8-formatter-junit-xml,
flake8-quotes
]
-
+ - id: flake8
+ name: Flake8 (tests)
+ args: [--config=tests/.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
+ ]
diff --git a/tests/.flake8 b/tests/.flake8
new file mode 100644
index 0000000..c1c5031
--- /dev/null
+++ b/tests/.flake8
@@ -0,0 +1,15 @@
+[flake8]
+max-line-length=100
+application_import_names=snekbox,tests
+ignore=
+ P102,B311,W503,E226,S311,
+ # Missing Docstrings
+ D1,
+ # Docstring Whitespace
+ D203,D212,D214,D215,
+ # Docstring Quotes
+ D301,D302,
+ # Docstring Content
+ D400,D401,D402,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414
+import-order-style=pycharm
+inline-quotes = "