From f54b1ebcaec114bd053dd037380b249fbab573d5 Mon Sep 17 00:00:00 2001 From: Thomas Ryan Date: Sun, 1 Oct 2023 18:07:17 -0400 Subject: [PATCH] Fixed flake8 errors --- pudb/debugger.py | 11 +++++------ pudb/settings.py | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/pudb/debugger.py b/pudb/debugger.py index afcfe34b..d77fab3d 100644 --- a/pudb/debugger.py +++ b/pudb/debugger.py @@ -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 @@ -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] @@ -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() @@ -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 diff --git a/pudb/settings.py b/pudb/settings.py index 77c22843..349c76c2 100644 --- a/pudb/settings.py +++ b/pudb/settings.py @@ -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() @@ -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) @@ -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))