1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

fix tidyall/flake8 tests

This commit is contained in:
Shlomi Fish 2020-02-27 19:27:41 +02:00
parent ad79d2429f
commit 25f1b222a1

View file

@ -31,6 +31,7 @@ from kivy.base import EventLoop
from kivy.base import stopTouchApp from kivy.base import stopTouchApp
from kivy.cache import Cache from kivy.cache import Cache
from kivy.clock import Clock from kivy.clock import Clock
from kivy.config import Config
from kivy.core.audio import SoundLoader from kivy.core.audio import SoundLoader
from kivy.core.window import Window from kivy.core.window import Window
from kivy.graphics import Color from kivy.graphics import Color
@ -54,9 +55,8 @@ from kivy.utils import platform
from pysollib.kivy.androidperms import requestStoragePerm from pysollib.kivy.androidperms import requestStoragePerm
from kivy.config import Config if platform != 'android':
if platform is not 'android': Config.set('input', 'mouse', 'mouse,multitouch_on_demand')
Config.set('input', 'mouse', 'mouse,multitouch_on_demand')
# ============================================================================= # =============================================================================
@ -724,19 +724,19 @@ class LImageItem(BoxLayout, LBase):
def send_event_pressed(self, touch, event): def send_event_pressed(self, touch, event):
if touch.is_double_tap: if touch.is_double_tap:
self.send_event_pressed_n(event,'<Double-1>') self.send_event_pressed_n(event, '<Double-1>')
else: else:
button = 'left' button = 'left'
if 'button' in touch.profile: if 'button' in touch.profile:
button = touch.button button = touch.button
if button is 'left': if button == 'left':
self.send_event_pressed_n(event,'<1>') self.send_event_pressed_n(event, '<1>')
return return
if button is 'middle': if button == 'middle':
self.send_event_pressed_n(event,'<2>') self.send_event_pressed_n(event, '<2>')
return return
if button is 'right': if button == 'right':
self.send_event_pressed_n(event,'<3>') self.send_event_pressed_n(event, '<3>')
return return
def on_touch_down(self, touch): def on_touch_down(self, touch):
@ -761,7 +761,7 @@ class LImageItem(BoxLayout, LBase):
event.y = ppos[1] event.y = ppos[1]
self.dragstart = touch.pos self.dragstart = touch.pos
event.cardid = i event.cardid = i
self.send_event_pressed(touch,event) self.send_event_pressed(touch, event)
return True return True
if self.group is not None: if self.group is not None:
@ -1792,7 +1792,7 @@ class LApp(App):
def doSize(self, obj, val): def doSize(self, obj, val):
mval = self.mainWindow.size mval = self.mainWindow.size
if (val[0]!=mval[0] and val[1]!=mval[1]): if (val[0] != mval[0] and val[1] != mval[1]):
logging.info("LApp: size changed %s - %s (%s)" % (obj, val, mval)) logging.info("LApp: size changed %s - %s (%s)" % (obj, val, mval))
Clock.schedule_once(self.makeDelayedRebuild(), 0.01) Clock.schedule_once(self.makeDelayedRebuild(), 0.01)
pass pass