mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
flake8
This commit is contained in:
parent
6a65e9f1c7
commit
307ce03e23
2 changed files with 13 additions and 12 deletions
|
@ -28,7 +28,7 @@ import os
|
|||
import Tkinter
|
||||
|
||||
# PySol imports
|
||||
from pysollib.mygettext import _, n_
|
||||
from pysollib.mygettext import _
|
||||
from pysollib.mfxutil import KwStruct
|
||||
from pysollib.settings import TITLE
|
||||
from pysollib.pysolaudio import pysolsoundserver
|
||||
|
@ -41,6 +41,7 @@ from tkwidget import MfxDialog, MfxMessageDialog
|
|||
# *
|
||||
# ************************************************************************
|
||||
|
||||
|
||||
class SoundOptionsDialog(MfxDialog):
|
||||
|
||||
def __init__(self, parent, title, app, **kw):
|
||||
|
@ -106,13 +107,13 @@ class SoundOptionsDialog(MfxDialog):
|
|||
command=self.mOptSoundDirectX, anchor='w')
|
||||
w.grid(row=row, column=0, columnspan=2, sticky='ew')
|
||||
#
|
||||
if app.audio.CAN_PLAY_MUSIC: # and app.startup_opt.sound_mode > 0:
|
||||
if app.audio.CAN_PLAY_MUSIC: # and app.startup_opt.sound_mode > 0:
|
||||
row += 1
|
||||
w = Tkinter.Label(frame, text=_('Sample volume:'))
|
||||
w.grid(row=row, column=0, sticky='w', padx=5)
|
||||
w = Tkinter.Scale(frame, from_=0, to=128, resolution=1,
|
||||
orient='horizontal', takefocus=0,
|
||||
length="3i", #label=_('Sample volume'),
|
||||
length="3i", # label=_('Sample volume'),
|
||||
variable=self.sample_volume)
|
||||
w.grid(row=row, column=1, sticky='ew', padx=5)
|
||||
row += 1
|
||||
|
@ -120,7 +121,7 @@ class SoundOptionsDialog(MfxDialog):
|
|||
w.grid(row=row, column=0, sticky='w', padx=5)
|
||||
w = Tkinter.Scale(frame, from_=0, to=128, resolution=1,
|
||||
orient='horizontal', takefocus=0,
|
||||
length="3i", #label=_('Music volume'),
|
||||
length="3i", # label=_('Music volume'),
|
||||
variable=self.music_volume)
|
||||
w.grid(row=row, column=1, sticky='ew', padx=5)
|
||||
|
||||
|
@ -152,7 +153,7 @@ class SoundOptionsDialog(MfxDialog):
|
|||
self.mainloop(focus, kw.timeout)
|
||||
|
||||
def initKw(self, kw):
|
||||
strings=[_("&OK"), _("&Apply"), _("&Cancel"),]
|
||||
strings = [_("&OK"), _("&Apply"), _("&Cancel"), ]
|
||||
kw = KwStruct(kw,
|
||||
strings=strings,
|
||||
default=0,
|
||||
|
@ -186,11 +187,11 @@ class SoundOptionsDialog(MfxDialog):
|
|||
return self.mDone(0)
|
||||
|
||||
def mOptSoundDirectX(self, *event):
|
||||
##print self.sound_mode.get()
|
||||
d = MfxMessageDialog(self.top, title=_("Sound preferences info"),
|
||||
text=_("""\
|
||||
# print self.sound_mode.get()
|
||||
MfxMessageDialog(
|
||||
self.top, title=_("Sound preferences info"),
|
||||
text=_("""\
|
||||
Changing DirectX settings will take effect
|
||||
the next time you restart """)+TITLE,
|
||||
bitmap="warning",
|
||||
default=0, strings=(_("&OK"),))
|
||||
|
||||
bitmap="warning",
|
||||
default=0, strings=(_("&OK"),))
|
||||
|
|
|
@ -27,7 +27,7 @@ my %skip =
|
|||
|
||||
# my $cmd = shell_quote( 'flake8', '.' );
|
||||
my $cmd = shell_quote( 'flake8',
|
||||
grep { not exists $skip{$_} } glob('./*.py ./scripts/*.py ./tests/board_gen/*.py ./pysollib/*.py ./pysollib/[cmgpuw]*/{*/*.py,*.py} ./pysollib/tile/*.py ./pysollib/tk/{[a-p],select,solv}*.py ./pysollib/ui/tktile/*.py') );
|
||||
grep { not exists $skip{$_} } glob('./*.py ./scripts/*.py ./tests/board_gen/*.py ./pysollib/*.py ./pysollib/[cmgpuw]*/{*/*.py,*.py} ./pysollib/tile/*.py ./pysollib/tk/{[a-p],select,solv,sound}*.py ./pysollib/ui/tktile/*.py') );
|
||||
|
||||
# TEST
|
||||
eq_or_diff( scalar(`$cmd`), '', "flake8 is happy with the code." );
|
||||
|
|
Loading…
Add table
Reference in a new issue