fixed code quality for flake8, pylint and pycodestyle
This commit is contained in:
parent
82b565571c
commit
5b3e9aaa14
|
@ -1011,7 +1011,8 @@ class Random(Screen):
|
|||
state.kivyapp.root.ids.sc10.init_ui()
|
||||
toast('New address created')
|
||||
|
||||
def add_validation(self, instance):
|
||||
@staticmethod
|
||||
def add_validation(instance):
|
||||
"""Checking validation at address creation time"""
|
||||
entered_label = str(instance.text.strip())
|
||||
lables = [BMConfigParser().get(obj, 'label')
|
||||
|
@ -1995,6 +1996,7 @@ class NavigateApp(MDApp):
|
|||
toast('Copied')
|
||||
|
||||
def reset_login_screen(self):
|
||||
"""This method is used for clearing random screen"""
|
||||
if self.root.ids.sc7.ids.add_random_bx.children:
|
||||
self.root.ids.sc7.ids.add_random_bx.clear_widgets()
|
||||
|
||||
|
@ -2045,7 +2047,7 @@ class GrashofPopup(Popup):
|
|||
# my_addresses = (
|
||||
# self.parent.children[1].children[0].children[0].ids.btn.values)
|
||||
my_addresses = (
|
||||
state.kivyapp.root.children[0].children[0].ids.btn.values)
|
||||
state.kivyapp.root.children[0].children[0].ids.btn.values)
|
||||
add_book = [addr[1] for addr in kivy_helper_search.search_sql(
|
||||
folder="addressbook")]
|
||||
entered_text = str(instance.text).strip()
|
||||
|
@ -3015,4 +3017,4 @@ class ToAddrBoxlayout(BoxLayout):
|
|||
|
||||
class RandomBoxlayout(BoxLayout):
|
||||
"""class for BoxLayout behaviour"""
|
||||
pass
|
||||
pass
|
||||
|
|
|
@ -4,6 +4,10 @@ and suggest how it may be installed
|
|||
"""
|
||||
|
||||
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
|
||||
# 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
|
||||
)
|
||||
|
||||
import logging
|
||||
import os
|
||||
from importlib import import_module
|
||||
import state
|
||||
# We can now use logging so set up a simple configuration
|
||||
formatter = logging.Formatter('%(levelname)s: %(message)s')
|
||||
handler = logging.StreamHandler(sys.stdout)
|
||||
|
@ -304,7 +304,7 @@ def check_openssl():
|
|||
' OpenSSL 0.9.8b or later with AES, Elliptic Curves (EC),'
|
||||
' ECDH, and ECDSA enabled.')
|
||||
return False
|
||||
if sys.version_info >=(3,0,0):
|
||||
if sys.version_info >= (3, 0, 0):
|
||||
matches = cflags_regex.findall(str(openssl_cflags))
|
||||
else:
|
||||
matches = cflags_regex.findall(openssl_cflags)
|
||||
|
@ -359,7 +359,8 @@ def check_curses():
|
|||
# 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
|
||||
# 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
|
||||
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ class TLSDispatcher(AdvancedDispatcher):
|
|||
self.handle_close()
|
||||
return
|
||||
|
||||
def tls_handshake(self):
|
||||
def tls_handshake(self): # pylint:disable=too-many-branches
|
||||
"""Perform TLS handshake and handle its stages"""
|
||||
# wait for flush
|
||||
# self.sslSocket.setblocking(0)
|
||||
|
|
Reference in New Issue
Block a user