From 9e210d511eb1c71e8f109332e49dd61c84c90c55 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 6 Jan 2024 00:15:24 +0300 Subject: [PATCH] Refactor(wx): Do not store attributes we do not need later [skip ci] --- m_librarian/wx/Application.py | 2 +- m_librarian/wx/SearchPanel.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/m_librarian/wx/Application.py b/m_librarian/wx/Application.py index b7ad92d..41d42d1 100644 --- a/m_librarian/wx/Application.py +++ b/m_librarian/wx/Application.py @@ -10,7 +10,7 @@ class MainWindow(AWindow): def OnInit(self): AWindow.OnInit(self) - self.search_panel = SearchPanel(self) + SearchPanel(self) class Application(wx.App): diff --git a/m_librarian/wx/SearchPanel.py b/m_librarian/wx/SearchPanel.py index 11633b3..89b0698 100644 --- a/m_librarian/wx/SearchPanel.py +++ b/m_librarian/wx/SearchPanel.py @@ -10,7 +10,7 @@ class SearchPanel(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent) - self.search_authors_vsizer = search_authors_vsizer = \ + search_authors_vsizer = \ wx.StaticBoxSizer(wx.VERTICAL, self, u'Поиск авторов') self.SetSizer(search_authors_vsizer) @@ -34,8 +34,7 @@ class SearchPanel(wx.Panel): self, label=u'Различать прописные/строчные') search_authors_vsizer.Add(search_case) - self.search_authors_button = search_authors_button = wx.Button( - self, label=u'Искать авторов') + search_authors_button = wx.Button(self, label=u'Искать авторов') search_authors_vsizer.Add(search_authors_button, 0, wx.ALIGN_CENTER, 0) search_authors_button.Bind(wx.EVT_BUTTON, self.SearchAuthors) -- 2.39.5