mpybit pylint fixes

This commit is contained in:
lakshyacis 2019-09-12 15:13:11 +05:30
parent 236beaedf6
commit 3686acf4d2
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB

View File

@ -1,4 +1,5 @@
"""Coding: utf-8.""" """Coding: utf-8."""
# pylint: disable=relative-import, too-many-lines
import os import os
import time import time
from functools import partial from functools import partial
@ -62,7 +63,7 @@ if platform == 'linux':
def toast(text): def toast(text):
"""Method will display the toast message.""" """Method will display the toast message."""
if platform == 'linux': if platform == 'linux':
from kivymd.toast.kivytoast import toast from kivymd.toast.kivytoast import toast # pylint: disable=redefined-outer-name
toast(text) toast(text)
return return
@ -552,7 +553,8 @@ class DropDownWidget(BoxLayout):
events_callback=self.callback_for_menu_items) events_callback=self.callback_for_menu_items)
msg_dialog.open() msg_dialog.open()
def callback_for_menu_items(self, text_item): @staticmethod
def callback_for_menu_items(text_item):
"""Method is used for getting the callback of alert box""" """Method is used for getting the callback of alert box"""
toast(text_item) toast(text_item)
@ -1259,6 +1261,7 @@ class NavigateApp(App): # pylint: disable=too-many-public-methods
self.root.ids.scr_mngr.current = state.search_screen self.root.ids.scr_mngr.current = state.search_screen
def clearSreeen(self, text): def clearSreeen(self, text):
"""Method is used for clear screen"""
if text == 'Sent': if text == 'Sent':
self.root.ids.sc4.clear_widgets() self.root.ids.sc4.clear_widgets()
self.root.ids.sc4.add_widget(Sent()) self.root.ids.sc4.add_widget(Sent())
@ -1291,7 +1294,7 @@ class NavigateApp(App): # pylint: disable=too-many-public-methods
return return
def add_search_bar(self): def add_search_bar(self):
"""Method 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( text_field = MDTextField(
@ -1313,6 +1316,7 @@ class NavigateApp(App): # pylint: disable=too-many-public-methods
return './images/drawer_logo1.png' return './images/drawer_logo1.png'
def set_mail_detail_header(self): def set_mail_detail_header(self):
"""Method is used for setting the details of the page"""
toolbar_obj = self.root.ids.toolbar toolbar_obj = self.root.ids.toolbar
toolbar_obj.left_action_items = [['arrow-left', lambda x: self.back_press()]] toolbar_obj.left_action_items = [['arrow-left', lambda x: self.back_press()]]
delete_btn = ['delete-forever', lambda x: self.root.ids.sc14.delete_mail()] delete_btn = ['delete-forever', lambda x: self.root.ids.sc14.delete_mail()]