Lint cleanup

trunk
alexis 2016-01-26 08:53:27 -05:00
parent 5b91d1d703
commit 58c8347743
3 changed files with 5 additions and 2 deletions

View File

@ -292,7 +292,7 @@ def draw_reverse_line(window, line, yoff):
"""Draw a line of text (like a status bar) in reverse video, filling in all
the way across the window."""
h, w = window.getmaxyx()
_, w = window.getmaxyx()
window.addstr(yoff, 0, line, curses.A_REVERSE)
window.addstr(yoff, len(line), " " * (w - len(line)), curses.A_REVERSE)

View File

@ -161,6 +161,7 @@ class Prompt(object):
self.exception = None
def draw_statusbar(self):
"""Display a reverse-video statusbar at the top of the screen"""
if self.exception is not None:
env.LAST_ERROR = self.exception
err_text = "ERROR: %s" % str(self.exception[1])
@ -170,6 +171,8 @@ class Prompt(object):
curses_stuff.draw_reverse_line(env.STDSCR, self.get_status_text(), 0)
def get_status_text(self):
"""Return the text to be displayed in the status bar. Does not
handle error messages."""
return env.FORMAT.name()
def loop(self, stack):

View File

@ -59,7 +59,7 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=locally-disabled,invalid-name,redefined-variable-type,wildcard-import
disable=locally-disabled,invalid-name,redefined-variable-type,wildcard-import,no-self-use
[REPORTS]