summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorcclauss <cclauss@bluewin.ch>2018-11-18 01:56:06 +0100
committerGitHub <noreply@github.com>2018-11-18 01:56:06 +0100
commitbb369d92096e6b3d6b7a26eb1bc46d97d2ab6729 (patch)
treeb7e74d4b7119db0746b9647b5775e166584645fe /examples
parentfc0ce00929c87568d1fc33217917b1ec1eab8327 (diff)
downloadcmd2-git-bb369d92096e6b3d6b7a26eb1bc46d97d2ab6729.tar.gz
Undefined names: from colorama import Fore, Back
__Fore__ and __Back__ are used on line 128 but they are never defined or imported. That means that they are _undefined names_ which have the potential to raise NameError at runtime. [flake8](http://flake8.pycqa.org) testing of https://github.com/python-cmd2/cmd2 on Python 3.7.1 $ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__ ``` ./examples/plumbum_colors.py:127:21: F821 undefined name 'Fore' color_off = Fore.RESET + Back.RESET ^ ./examples/plumbum_colors.py:127:34: F821 undefined name 'Back' color_off = Fore.RESET + Back.RESET ^ ```
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/plumbum_colors.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/plumbum_colors.py b/examples/plumbum_colors.py
index bfa07a74..0cea3c10 100755
--- a/examples/plumbum_colors.py
+++ b/examples/plumbum_colors.py
@@ -31,6 +31,7 @@ import random
import argparse
import cmd2
+from colorama import Fore, Back
from plumbum.colors import fg, bg, reset
FG_COLORS = {