Skip to content

Commit bb369d9

Browse files
author
cclauss
authored
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 ^ ```
1 parent fc0ce00 commit bb369d9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/plumbum_colors.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import argparse
3232

3333
import cmd2
34+
from colorama import Fore, Back
3435
from plumbum.colors import fg, bg, reset
3536

3637
FG_COLORS = {

0 commit comments

Comments
 (0)