Skip to content

Commit

Permalink
Fixed flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasJRyan committed Oct 1, 2023
1 parent 0b03658 commit f54b1eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions pudb/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,14 +945,14 @@ def helpside(w, size, key):
self.rhs_col_sigwrap),
],
dividechars=1)

background = urwid.AttrMap(self.columns, "background")

self.caption = urwid.Text("")
self.header = urwid.AttrMap(self.caption, "header")

self.top = SignalWrap(urwid.Frame(background, self.header))

if CONFIG["hide_header"]:
self.top._w.header = None

Expand Down Expand Up @@ -2421,7 +2421,7 @@ def __call__(subself, w, size, key): # noqa: N805, E501 # pylint: disable=no-se
width=("relative", 75),
height=("relative", 75),
)

w = Attr(w, "background")

return self.event_loop(w)[0]
Expand Down Expand Up @@ -2850,7 +2850,6 @@ def interaction(self, exc_tuple, show_exc_dialog=True):
self.show_header()
CONFIG["hide_header"] = False


self.caption.set_text(caption)
self.event_loop()

Expand Down Expand Up @@ -2962,7 +2961,7 @@ def make_frame_ui(i, frame_lineno):

def update_cmdline_win(self):
self.set_cmdline_state(not CONFIG["hide_cmdline_win"])

def update_header(self):
"""Update the header to reflect the current settings."""
self.top._w.header = self.header if not CONFIG["hide_header"] else None
Expand Down
6 changes: 3 additions & 3 deletions pudb/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def _update_prompt_on_quit():

def _update_hide_cmdline_win():
ui.update_cmdline_win()

def _update_hide_header():
ui.update_header()

Expand Down Expand Up @@ -226,7 +226,7 @@ def _update_config(check_box, new_state, option_newvalue):
new_conf_dict["hide_cmdline_win"] = not check_box.get_state()
conf_dict.update(new_conf_dict)
_update_hide_cmdline_win()

elif option == "hide_header":
new_conf_dict["hide_header"] = not check_box.get_state()
conf_dict.update(new_conf_dict)
Expand Down Expand Up @@ -279,7 +279,7 @@ def _update_config(check_box, new_state, option_newvalue):
"when not in use",
bool(conf_dict["hide_cmdline_win"]), on_state_change=_update_config,
user_data=("hide_cmdline_win", None))

hide_header = urwid.CheckBox("Hide header from top of window",
bool(conf_dict["hide_header"]), on_state_change=_update_config,
user_data=("hide_header", None))
Expand Down

0 comments on commit f54b1eb

Please sign in to comment.