Flakes8 and Autopep8 after pull

This commit is contained in:
lakshyacis 2019-08-07 13:42:41 +05:30
parent e4c1a57c22
commit 76d8f51a37
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB

View File

@ -1039,6 +1039,7 @@ class NavigateApp(App):
shutdown.doCleanShutdown() shutdown.doCleanShutdown()
def mail_count(self, text): def mail_count(self, text):
"""Counting Mail numbers."""
if state.association == '': if state.association == '':
if BMConfigParser().addresses(): if BMConfigParser().addresses():
state.association = BMConfigParser().addresses()[0] state.association = BMConfigParser().addresses()[0]
@ -1081,7 +1082,7 @@ class NavigateApp(App):
return '' return ''
def searchQuery(self, instance, *args): def searchQuery(self, instance, *args):
'''This method is used for showing searched mails''' """Method used for showing searched mails."""
state.search_screen = self.root.ids.scr_mngr.current state.search_screen = self.root.ids.scr_mngr.current
state.searcing_text = str(instance.text).strip() state.searcing_text = str(instance.text).strip()
if state.search_screen == 'inbox': if state.search_screen == 'inbox':
@ -1093,11 +1094,13 @@ class NavigateApp(App):
self.root.ids.scr_mngr.current = state.search_screen self.root.ids.scr_mngr.current = state.search_screen
def check_search_screen(self, instance): def check_search_screen(self, instance):
"""Method used for showing search button only on inbox or sent screen.""" """Method show search button only on inbox or sent screen."""
if instance.text == 'Inbox' or instance.text == 'Sent': if instance.text == 'Inbox' or instance.text == 'Sent':
if not self.root.ids.search_bar.children: if not self.root.ids.search_bar.children:
self.root.ids.search_bar.add_widget(MDIconButton(icon = 'magnify')) self.root.ids.search_bar.add_widget(
text_field = MDTextField(id='search_field', hint_text='Search icon') MDIconButton(icon='magnify'))
text_field = MDTextField(
id='search_field', hint_text='Search icon')
text_field.bind(text=self.searchQuery) text_field.bind(text=self.searchQuery)
self.root.ids.search_bar.add_widget(text_field) self.root.ids.search_bar.add_widget(text_field)
state.searcing_text = '' state.searcing_text = ''
@ -1110,13 +1113,15 @@ class NavigateApp(App):
return return
def add_search_bar(self): def add_search_bar(self):
"""This method is used for adding search function on screen""" """Method used for adding search function on screen."""
if not self.root.ids.search_bar.children: if not self.root.ids.search_bar.children:
self.root.ids.search_bar.add_widget(MDIconButton(icon='magnify')) self.root.ids.search_bar.add_widget(MDIconButton(icon='magnify'))
text_field = MDTextField(id='search_field', hint_text='Search icon') text_field = MDTextField(
id='search_field', hint_text='Search icon')
text_field.bind(text=self.searchQuery) text_field.bind(text=self.searchQuery)
self.root.ids.search_bar.add_widget(text_field) self.root.ids.search_bar.add_widget(text_field)
class GrashofPopup(Popup): class GrashofPopup(Popup):
"""Methods for saving contacts, error messages.""" """Methods for saving contacts, error messages."""
@ -1540,4 +1545,5 @@ class CustomSpinner(Spinner):
def remove_search_bar(self): def remove_search_bar(self):
"""Remove search bar."""
self.parent.parent.parent.parent.parent.ids.search_bar.clear_widgets() self.parent.parent.parent.parent.parent.ids.search_bar.clear_widgets()