summaryrefslogtreecommitdiff
path: root/tasks.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-12-06 09:20:39 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-12-06 09:20:39 -0500
commit9d90c1eb57c62ba1fcd8e470fa2e27248e1e9064 (patch)
treed3641a78217bbb79cbe039f80648b44b2fbdd0a4 /tasks.py
parentc689e74fed45bf1a7b2908defc343d35f31dff71 (diff)
downloadcmd2-git-9d90c1eb57c62ba1fcd8e470fa2e27248e1e9064.tar.gz
Added flake8 invoke task to make it easy for developers to run flake8 locally identical to how it gets run during a PR
Diffstat (limited to 'tasks.py')
-rw-r--r--tasks.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tasks.py b/tasks.py
index d272a34b..d5f5976b 100644
--- a/tasks.py
+++ b/tasks.py
@@ -227,3 +227,11 @@ def pypi_test(context):
"Build and upload a distribution to https://test.pypi.org"
context.run('twine upload --repository-url https://test.pypi.org/legacy/ dist/*')
namespace.add_task(pypi_test)
+
+
+# Flake8 - linter and tool for style guide enforcement and linting
+@invoke.task
+def flake8(context):
+ "Run flake8 linter and tool for style guide enforcement"
+ context.run("flake8 --ignore=E252 --max-complexity=31 --max-line-length=127 --show-source --statistics")
+namespace.add_task(flake8)