flake8: enable more mandatory tests
This commit is contained in:
@@ -12,7 +12,7 @@ class NFCBase(Widget):
|
||||
'''
|
||||
|
||||
payload = ObjectProperty(None)
|
||||
'''This is the data gotten from the tag.
|
||||
'''This is the data gotten from the tag.
|
||||
'''
|
||||
|
||||
def nfc_init(self):
|
||||
|
||||
@@ -46,7 +46,7 @@ class ScannerAndroid(NFCBase):
|
||||
global app
|
||||
app = App.get_running_app()
|
||||
|
||||
# Make sure we are listening to new intent
|
||||
# Make sure we are listening to new intent
|
||||
activity.bind(on_new_intent=self.on_new_intent)
|
||||
|
||||
# Configure nfc
|
||||
@@ -55,7 +55,7 @@ class ScannerAndroid(NFCBase):
|
||||
# Check if adapter exists
|
||||
if not self.nfc_adapter:
|
||||
return False
|
||||
|
||||
|
||||
# specify that we want our activity to remain on top when a new intent
|
||||
# is fired
|
||||
self.nfc_pending_intent = PendingIntent.getActivity(context, 0,
|
||||
@@ -131,7 +131,7 @@ class ScannerAndroid(NFCBase):
|
||||
''' This function is called when the application receives a
|
||||
new intent, for the ones the application has registered previously,
|
||||
either in the manifest or in the foreground dispatch setup in the
|
||||
nfc_init function above.
|
||||
nfc_init function above.
|
||||
'''
|
||||
|
||||
action_list = (NfcAdapter.ACTION_NDEF_DISCOVERED,)
|
||||
@@ -214,7 +214,7 @@ class ScannerAndroid(NFCBase):
|
||||
ndef_record = NdefRecord(
|
||||
NdefRecord.TNF_MIME_MEDIA,
|
||||
'org.electrum.kivy', '', data)
|
||||
|
||||
|
||||
# Create message
|
||||
ndef_message = NdefMessage([ndef_record])
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ class Drawer(Factory.RelativeLayout):
|
||||
return
|
||||
|
||||
def on_touch_move(self, touch):
|
||||
if not touch.grab_current is self:
|
||||
if touch.grab_current is not self:
|
||||
return
|
||||
self._touch = False
|
||||
# skip on tablet mode
|
||||
@@ -175,7 +175,7 @@ class Drawer(Factory.RelativeLayout):
|
||||
return
|
||||
|
||||
def on_touch_up(self, touch):
|
||||
if not touch.grab_current is self:
|
||||
if touch.grab_current is not self:
|
||||
return
|
||||
|
||||
self._triigger_gc()
|
||||
|
||||
@@ -3,12 +3,12 @@ from kivy.utils import get_color_from_hex, platform
|
||||
|
||||
def address_colors(wallet, addr):
|
||||
"""
|
||||
Chooses the appropriate text color and background color to
|
||||
Chooses the appropriate text color and background color to
|
||||
mark receiving, change and billing addresses.
|
||||
|
||||
Returns: color, background_color
|
||||
"""
|
||||
|
||||
|
||||
# modified colors (textcolor, background_color) from electrum/gui/qt/util.py
|
||||
GREEN = ("#000000", "#8af296")
|
||||
YELLOW = ("#000000", "#ffff00")
|
||||
|
||||
Reference in New Issue
Block a user