fixed flake8 CQ fixed for mpybit, language_script and some other modules
This commit is contained in:
parent
67292f2ea0
commit
5be08babf5
|
@ -59,7 +59,7 @@ translation_command = [
|
||||||
for kv_file in KVFILES:
|
for kv_file in KVFILES:
|
||||||
translation_command.append(f'{current_dir_path}/kv/{kv_file}.kv')
|
translation_command.append(f'{current_dir_path}/kv/{kv_file}.kv')
|
||||||
|
|
||||||
print('translation_command..............', translation_command)
|
# print('translation_command..............', translation_command)
|
||||||
subprocess.run(translation_command, stdout=subprocess.DEVNULL)
|
subprocess.run(translation_command, stdout=subprocess.DEVNULL)
|
||||||
# print("The exit code1 was: %d" % list_files.returncode)
|
# print("The exit code1 was: %d" % list_files.returncode)
|
||||||
|
|
||||||
|
@ -74,17 +74,21 @@ for key in windowsLanguageMap.keys():
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
['msgmerge', '--update', '--no-fuzzy-matching', '--backup=off',
|
['msgmerge', '--update', '--no-fuzzy-matching', '--backup=off',
|
||||||
f'{current_dir_path}/translations/po/bitmessage_{key}.po', f'{current_dir_path}/messages.pot'],
|
f'{current_dir_path}/translations/po/bitmessage_{key}.po', f'{current_dir_path}/messages.pot'],
|
||||||
stdout=subprocess.DEVNULL)
|
stdout=subprocess.DEVNULL
|
||||||
|
)
|
||||||
|
|
||||||
print("Create .mo file from .po file")
|
print("Create .mo file from .po file")
|
||||||
|
|
||||||
for key in windowsLanguageMap.keys():
|
for key in windowsLanguageMap.keys():
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
['mkdir', '-p', f'{current_dir_path}/translations/mo/locales/{key}/LC_MESSAGES'],
|
['mkdir', '-p', f'{current_dir_path}/translations/mo/locales/{key}/LC_MESSAGES'],
|
||||||
stdout=subprocess.DEVNULL)
|
stdout=subprocess.DEVNULL
|
||||||
|
)
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
['touch', f'{current_dir_path}/translations/mo/locales/{key}/LC_MESSAGES/langapp.mo'],
|
['touch', f'{current_dir_path}/translations/mo/locales/{key}/LC_MESSAGES/langapp.mo'],
|
||||||
stdout=subprocess.DEVNULL)
|
stdout=subprocess.DEVNULL
|
||||||
|
)
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
['msgfmt', '-c', '-o', f'{current_dir_path}/translations/mo/locales/{key}/LC_MESSAGES/langapp.mo',
|
['msgfmt', '-c', '-o', f'{current_dir_path}/translations/mo/locales/{key}/LC_MESSAGES/langapp.mo',
|
||||||
f'{current_dir_path}/translations/po/bitmessage_{key}.po'], stdout=subprocess.DEVNULL)
|
f'{current_dir_path}/translations/po/bitmessage_{key}.po'], stdout=subprocess.DEVNULL
|
||||||
|
)
|
||||||
|
|
|
@ -312,7 +312,6 @@ class Inbox(Screen):
|
||||||
int(state.sent_count) + int(state.inbox_count))
|
int(state.sent_count) + int(state.inbox_count))
|
||||||
src_mng_obj.allmail_cnt.ids.badge_txt.text = showLimitedCnt(int(state.all_count))
|
src_mng_obj.allmail_cnt.ids.badge_txt.text = showLimitedCnt(int(state.all_count))
|
||||||
|
|
||||||
|
|
||||||
def inboxDataQuery(self, xAddress, where, what, start_indx=0, end_indx=20):
|
def inboxDataQuery(self, xAddress, where, what, start_indx=0, end_indx=20):
|
||||||
"""This method is used for retrieving inbox data"""
|
"""This method is used for retrieving inbox data"""
|
||||||
self.queryreturn = kivy_helper_search.search_sql(
|
self.queryreturn = kivy_helper_search.search_sql(
|
||||||
|
@ -598,7 +597,8 @@ class MyAddress(Screen):
|
||||||
MDFlatButton(
|
MDFlatButton(
|
||||||
text="Ok", on_release=lambda x: callback_for_menu_items("Ok")
|
text="Ok", on_release=lambda x: callback_for_menu_items("Ok")
|
||||||
),
|
),
|
||||||
],)
|
],
|
||||||
|
)
|
||||||
dialog_box.open()
|
dialog_box.open()
|
||||||
|
|
||||||
def callback_for_menu_items(text_item, *arg):
|
def callback_for_menu_items(text_item, *arg):
|
||||||
|
@ -1029,7 +1029,6 @@ class DropDownWidget(BoxLayout):
|
||||||
dialog_box.dismiss()
|
dialog_box.dismiss()
|
||||||
toast(text_item)
|
toast(text_item)
|
||||||
|
|
||||||
|
|
||||||
# @staticmethod
|
# @staticmethod
|
||||||
# def callback_for_menu_items(text_item, *arg):
|
# def callback_for_menu_items(text_item, *arg):
|
||||||
# """Callback of alert box"""
|
# """Callback of alert box"""
|
||||||
|
@ -1068,7 +1067,8 @@ class DropDownWidget(BoxLayout):
|
||||||
MDFlatButton(
|
MDFlatButton(
|
||||||
text="Ok", on_release=lambda x: callback_for_menu_items("Ok")
|
text="Ok", on_release=lambda x: callback_for_menu_items("Ok")
|
||||||
),
|
),
|
||||||
],)
|
],
|
||||||
|
)
|
||||||
dialog_box.open()
|
dialog_box.open()
|
||||||
|
|
||||||
def callback_for_menu_items(text_item, *arg):
|
def callback_for_menu_items(text_item, *arg):
|
||||||
|
@ -2644,6 +2644,7 @@ class NavigateApp(MDApp):
|
||||||
"""This method is used for opening popup"""
|
"""This method is used for opening popup"""
|
||||||
instance.open()
|
instance.open()
|
||||||
|
|
||||||
|
|
||||||
class GrashofPopup(BoxLayout):
|
class GrashofPopup(BoxLayout):
|
||||||
"""Moule for save contacts and error messages"""
|
"""Moule for save contacts and error messages"""
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,6 @@ sys.path.insert(0, app_dir)
|
||||||
depends.check_dependencies()
|
depends.check_dependencies()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _fixSocket():
|
def _fixSocket():
|
||||||
if sys.platform.startswith('linux'):
|
if sys.platform.startswith('linux'):
|
||||||
socket.SO_BINDTODEVICE = 25
|
socket.SO_BINDTODEVICE = 25
|
||||||
|
|
|
@ -126,11 +126,13 @@ class BMConfigParser(configparser.ConfigParser):
|
||||||
def addresses(self, hidden=False):
|
def addresses(self, hidden=False):
|
||||||
|
|
||||||
"""Return a list of local bitmessage addresses (from section labels)"""
|
"""Return a list of local bitmessage addresses (from section labels)"""
|
||||||
return [x for x in BMConfigParser().sections() if x.startswith('BM-') and (hidden or not BMConfigParser().safeGetBoolean(x, 'hidden'))]
|
return [x for x in BMConfigParser().sections() if x.startswith('BM-') and (
|
||||||
|
hidden or not BMConfigParser().safeGetBoolean(x, 'hidden'))]
|
||||||
|
|
||||||
def paymentaddress(self):
|
def paymentaddress(self):
|
||||||
"""Return a list of local payment addresses (from section labels)"""
|
"""Return a list of local payment addresses (from section labels)"""
|
||||||
return ''.join([x for x in BMConfigParser().sections() if x.startswith('BM-') and BMConfigParser().safeGetBoolean(x, 'payment')])
|
return ''.join([x for x in BMConfigParser().sections() if x.startswith(
|
||||||
|
'BM-') and BMConfigParser().safeGetBoolean(x, 'payment')])
|
||||||
|
|
||||||
def read(self, filenames):
|
def read(self, filenames):
|
||||||
configparser.ConfigParser.read(self, filenames)
|
configparser.ConfigParser.read(self, filenames)
|
||||||
|
|
|
@ -79,7 +79,6 @@ def search_sql(
|
||||||
return sqlQuery(sqlStatementBase, sqlArguments)
|
return sqlQuery(sqlStatementBase, sqlArguments)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def check_match(
|
def check_match(
|
||||||
toAddress, fromAddress, subject, message, where=None, what=None):
|
toAddress, fromAddress, subject, message, where=None, what=None):
|
||||||
"""
|
"""
|
||||||
|
|
Reference in New Issue
Block a user