From 3686acf4d206f0dfc3e51b1aef2353fbefe80108 Mon Sep 17 00:00:00 2001 From: lakshyacis Date: Thu, 12 Sep 2019 15:13:11 +0530 Subject: [PATCH] mpybit pylint fixes --- src/bitmessagekivy/mpybit.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/bitmessagekivy/mpybit.py b/src/bitmessagekivy/mpybit.py index 0a6eb023..d5bda558 100644 --- a/src/bitmessagekivy/mpybit.py +++ b/src/bitmessagekivy/mpybit.py @@ -1,4 +1,5 @@ """Coding: utf-8.""" +# pylint: disable=relative-import, too-many-lines import os import time from functools import partial @@ -62,7 +63,7 @@ if platform == 'linux': def toast(text): """Method will display the toast message.""" if platform == 'linux': - from kivymd.toast.kivytoast import toast + from kivymd.toast.kivytoast import toast # pylint: disable=redefined-outer-name toast(text) return @@ -552,7 +553,8 @@ class DropDownWidget(BoxLayout): events_callback=self.callback_for_menu_items) 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""" 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 def clearSreeen(self, text): + """Method is used for clear screen""" if text == 'Sent': self.root.ids.sc4.clear_widgets() self.root.ids.sc4.add_widget(Sent()) @@ -1291,7 +1294,7 @@ class NavigateApp(App): # pylint: disable=too-many-public-methods return 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: self.root.ids.search_bar.add_widget(MDIconButton(icon='magnify')) text_field = MDTextField( @@ -1313,6 +1316,7 @@ class NavigateApp(App): # pylint: disable=too-many-public-methods return './images/drawer_logo1.png' def set_mail_detail_header(self): + """Method is used for setting the details of the page""" toolbar_obj = self.root.ids.toolbar toolbar_obj.left_action_items = [['arrow-left', lambda x: self.back_press()]] delete_btn = ['delete-forever', lambda x: self.root.ids.sc14.delete_mail()]