fixed code quality for flake8, pylint and pycodestyle

This commit is contained in:
navjot 2020-04-17 17:26:05 +05:30
parent 82b565571c
commit 5b3e9aaa14
No known key found for this signature in database
GPG Key ID: 9EE70AFD71357F1C
3 changed files with 13 additions and 10 deletions

View File

@ -1011,7 +1011,8 @@ class Random(Screen):
state.kivyapp.root.ids.sc10.init_ui() state.kivyapp.root.ids.sc10.init_ui()
toast('New address created') toast('New address created')
def add_validation(self, instance): @staticmethod
def add_validation(instance):
"""Checking validation at address creation time""" """Checking validation at address creation time"""
entered_label = str(instance.text.strip()) entered_label = str(instance.text.strip())
lables = [BMConfigParser().get(obj, 'label') lables = [BMConfigParser().get(obj, 'label')
@ -1995,6 +1996,7 @@ class NavigateApp(MDApp):
toast('Copied') toast('Copied')
def reset_login_screen(self): def reset_login_screen(self):
"""This method is used for clearing random screen"""
if self.root.ids.sc7.ids.add_random_bx.children: if self.root.ids.sc7.ids.add_random_bx.children:
self.root.ids.sc7.ids.add_random_bx.clear_widgets() self.root.ids.sc7.ids.add_random_bx.clear_widgets()

View File

@ -4,6 +4,10 @@ and suggest how it may be installed
""" """
import sys import sys
import logging
import os
import state
from importlib import import_module
# Only really old versions of Python don't have sys.hexversion. We don't # Only really old versions of Python don't have sys.hexversion. We don't
# support them. The logging module was introduced in Python 2.3 # support them. The logging module was introduced in Python 2.3
@ -14,10 +18,6 @@ if not hasattr(sys, 'hexversion') or sys.hexversion < 0x20300F0:
% sys.version % sys.version
) )
import logging
import os
from importlib import import_module
import state
# We can now use logging so set up a simple configuration # We can now use logging so set up a simple configuration
formatter = logging.Formatter('%(levelname)s: %(message)s') formatter = logging.Formatter('%(levelname)s: %(message)s')
handler = logging.StreamHandler(sys.stdout) handler = logging.StreamHandler(sys.stdout)
@ -359,7 +359,8 @@ def check_curses():
# The pythondialog author does not like Python2 str, so we have to use # The pythondialog author does not like Python2 str, so we have to use
# unicode for just the version otherwise we get the repr form which # unicode for just the version otherwise we get the repr form which
# includes the module and class names along with the actual version. # includes the module and class names along with the actual version.
logger.info('dialog Utility Version %s', unicode(dialog_util_version)) # logger.info('dialog Utility Version %s', unicode(dialog_util_version))
logger.info('dialog Utility Version {}'.format(str(dialog_util_version)))
return True return True

View File

@ -172,7 +172,7 @@ class TLSDispatcher(AdvancedDispatcher):
self.handle_close() self.handle_close()
return return
def tls_handshake(self): def tls_handshake(self): # pylint:disable=too-many-branches
"""Perform TLS handshake and handle its stages""" """Perform TLS handshake and handle its stages"""
# wait for flush # wait for flush
# self.sslSocket.setblocking(0) # self.sslSocket.setblocking(0)