From a5833be1b7e8748e0ecaf604258b9ea97c20c350 Mon Sep 17 00:00:00 2001 From: surbhi Date: Tue, 4 Sep 2018 18:35:22 +0530 Subject: [PATCH] Fix pylint Instance of 'str' has no 'ids' member issue --- src/bitmessagekivy/mpybit.py | 18 +++++++++--------- src/state.py | 2 -- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/bitmessagekivy/mpybit.py b/src/bitmessagekivy/mpybit.py index 0d4ff2b5..815acacd 100644 --- a/src/bitmessagekivy/mpybit.py +++ b/src/bitmessagekivy/mpybit.py @@ -35,21 +35,21 @@ class NavigateApp(App, TextInput): An application can be built if you return a widget on build(), or if you set self.root. """ - state.main_widget = Builder.load_file( + main_widget = Builder.load_file( os.path.join(os.path.dirname(__file__), 'main.kv')) self.nav_drawer = Navigator() - return state.main_widget + return main_widget def getCurrentAccountData(self, text): """Get Current Address Account Data.""" state.association = text - state.main_widget.ids.sc1.clear_widgets() - state.main_widget.ids.sc2.clear_widgets() - state.main_widget.ids.sc3.clear_widgets() - state.main_widget.ids.sc1.add_widget(Inbox()) - state.main_widget.ids.sc2.add_widget(Sent()) - state.main_widget.ids.sc3.add_widget(Trash()) - state.main_widget.ids.toolbar.title = BMConfigParser().get( + self.root.ids.sc1.clear_widgets() + self.root.ids.sc2.clear_widgets() + self.root.ids.sc3.clear_widgets() + self.root.ids.sc1.add_widget(Inbox()) + self.root.ids.sc2.add_widget(Sent()) + self.root.ids.sc3.add_widget(Trash()) + self.root.ids.toolbar.title = BMConfigParser().get( state.association, 'label') + '({})'.format(state.association) Inbox() Sent() diff --git a/src/state.py b/src/state.py index 6630a86d..f052d7bb 100644 --- a/src/state.py +++ b/src/state.py @@ -72,5 +72,3 @@ testmode = False kivy = False association = '' - -main_widget = ''