Another portion of the formatting and import fixes #1789

Merged
g1itch merged 4 commits from flake8 into v0.6 2021-07-28 13:54:24 +02:00
Showing only changes of commit 822f58ea5d - Show all commits

View File

@ -9,28 +9,22 @@ import sys
import threading import threading
import time import time
if sys.version_info[0] == 3: try:
from . import helper_sql
from . import helper_startup
from . import paths
from . import queues
from . import state
from . import tr
from .bmconfigparser import BMConfigParser
from .debug import logger
# pylint: disable=attribute-defined-outside-init,protected-access
from .addresses import encodeAddress
else:
import helper_sql import helper_sql
import helper_startup import helper_startup
import paths import paths
import queues import queues
import state import state
import tr from addresses import encodeAddress
from bmconfigparser import BMConfigParser from bmconfigparser import BMConfigParser
from debug import logger from debug import logger
# pylint: disable=attribute-defined-outside-init,protected-access from tr import _translate
from addresses import encodeAddress except ImportError:
from . import helper_sql, helper_startup, paths, queues, state
from .addresses import encodeAddress
from .bmconfigparser import BMConfigParser
from .debug import logger
from .tr import _translate
class sqlThread(threading.Thread): class sqlThread(threading.Thread):
@ -454,10 +448,10 @@ class sqlThread(threading.Thread):
' sqlThread will now exit.') ' sqlThread will now exit.')
queues.UISignalQueue.put(( queues.UISignalQueue.put((
'alert', ( 'alert', (
tr._translate( _translate(
"MainWindow", "MainWindow",
"Disk full"), "Disk full"),
tr._translate( _translate(
"MainWindow", "MainWindow",
'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'), 'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'),
True))) True)))
@ -484,10 +478,10 @@ class sqlThread(threading.Thread):
' sqlThread will now exit.') ' sqlThread will now exit.')
queues.UISignalQueue.put(( queues.UISignalQueue.put((
'alert', ( 'alert', (
tr._translate( _translate(
"MainWindow", "MainWindow",
"Disk full"), "Disk full"),
tr._translate( _translate(
"MainWindow", "MainWindow",
'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'), 'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'),
True))) True)))
@ -510,10 +504,10 @@ class sqlThread(threading.Thread):
' sqlThread will now exit.') ' sqlThread will now exit.')
queues.UISignalQueue.put(( queues.UISignalQueue.put((
'alert', ( 'alert', (
tr._translate( _translate(
"MainWindow", "MainWindow",
"Disk full"), "Disk full"),
tr._translate( _translate(
"MainWindow", "MainWindow",
'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'), 'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'),
True))) True)))
@ -535,10 +529,10 @@ class sqlThread(threading.Thread):
' sqlThread will now exit.') ' sqlThread will now exit.')
queues.UISignalQueue.put(( queues.UISignalQueue.put((
'alert', ( 'alert', (
tr._translate( _translate(
"MainWindow", "MainWindow",
"Disk full"), "Disk full"),
tr._translate( _translate(
"MainWindow", "MainWindow",
'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'), 'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'),
True))) True)))
@ -561,10 +555,10 @@ class sqlThread(threading.Thread):
' sqlThread will now exit.') ' sqlThread will now exit.')
queues.UISignalQueue.put(( queues.UISignalQueue.put((
'alert', ( 'alert', (
tr._translate( _translate(
"MainWindow", "MainWindow",
"Disk full"), "Disk full"),
tr._translate( _translate(
"MainWindow", "MainWindow",
'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'), 'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'),
True))) True)))
@ -588,10 +582,10 @@ class sqlThread(threading.Thread):
' sqlThread will now exit.') ' sqlThread will now exit.')
queues.UISignalQueue.put(( queues.UISignalQueue.put((
'alert', ( 'alert', (
tr._translate( _translate(
"MainWindow", "MainWindow",
"Disk full"), "Disk full"),
tr._translate( _translate(
"MainWindow", "MainWindow",
'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'), 'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'),
True))) True)))
@ -609,10 +603,10 @@ class sqlThread(threading.Thread):
' sqlThread will now exit.') ' sqlThread will now exit.')
queues.UISignalQueue.put(( queues.UISignalQueue.put((
'alert', ( 'alert', (
tr._translate( _translate(
"MainWindow", "MainWindow",
"Disk full"), "Disk full"),
tr._translate( _translate(
"MainWindow", "MainWindow",
'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'), 'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'),
True))) True)))