Skip to content

Commit

Permalink
Fixed flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasJRyan authored and inducer committed Oct 6, 2023
1 parent d8ff838 commit d35e640
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 @@ -947,14 +947,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 @@ -2423,7 +2423,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 @@ -2852,7 +2852,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 @@ -2964,7 +2963,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 d35e640

Please sign in to comment.