summaryrefslogtreecommitdiff
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-12-06 01:24:19 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-12-06 01:24:19 -0500
commitc689e74fed45bf1a7b2908defc343d35f31dff71 (patch)
tree3c1904debb429274d2fac316300a8b75b200a66c /tests/conftest.py
parent709af49a7f161c98260cc5ddda736987fb0f1f23 (diff)
downloadcmd2-git-c689e74fed45bf1a7b2908defc343d35f31dff71.tar.gz
Fix flake8 issues
This commit contains a very large number of trivial changes in order to fix flake8 errors and warnings. Predominantly these are whitespace changes. Additionally, the build for Python 3.7 on TravisCI has been tweaked to fail if there are any flake8 errors using the following commandline: * flake8 . --count --ignore=E252 --max-complexity=31 --max-line-length=127 --show-source --statistics NOTE: In the future the max cyclomatic complexity should be lowered, but some improvements need to be made first. One flake8 error is being ignored entirely: * E252 missing whitespace around parameter equals * ignored because it doesn't correctly deal with default argument values after a type hint A few flake8 errors are being selectively ignored in certain files: * C901 fuction is too complex * ignored in argparse_completer.py because the complex code is an override of argparse complexity * E302 expected 2 blank lines after ... * ignored in all unit test files for convenience * F401 module imported but unused * ignored in cmd2/__init__.py because imports are for convenience of cmd2 developers and backwards compatibility * F821 undefined name * ignored in cmd2 script files which are intended to run only within cmd2 applications via pyscript where "app" and "cmd" are defined
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index ac6a1896..223389b9 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -5,7 +5,6 @@ Cmd2 unit/functional testing
Copyright 2016 Federico Ceratto <federico.ceratto@gmail.com>
Released under MIT license, see LICENSE file
"""
-import sys
from typing import Optional
from unittest import mock
@@ -31,7 +30,7 @@ BASE_HELP = """Documented commands (type help <topic>):
========================================
alias help load py quit shell
edit history macro pyscript set shortcuts
-"""
+""" # noqa: W291
BASE_HELP_VERBOSE = """
Documented commands (type help <topic>):
@@ -108,6 +107,7 @@ quiet: False # Don't print nonessential feedback
timing: False # Report execution times
"""
+
def normalize(block):
""" Normalize a block of text to perform comparison.