Skip to content

Commit 9d90c1e

Browse files
committed
Added flake8 invoke task to make it easy for developers to run flake8 locally identical to how it gets run during a PR
1 parent c689e74 commit 9d90c1e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tasks.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,11 @@ def pypi_test(context):
227227
"Build and upload a distribution to https://test.pypi.org"
228228
context.run('twine upload --repository-url https://test.pypi.org/legacy/ dist/*')
229229
namespace.add_task(pypi_test)
230+
231+
232+
# Flake8 - linter and tool for style guide enforcement and linting
233+
@invoke.task
234+
def flake8(context):
235+
"Run flake8 linter and tool for style guide enforcement"
236+
context.run("flake8 --ignore=E252 --max-complexity=31 --max-line-length=127 --show-source --statistics")
237+
namespace.add_task(flake8)

0 commit comments

Comments
 (0)