mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
flake8 .
This commit is contained in:
parent
389143ec23
commit
0876e08547
3 changed files with 10 additions and 16 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- mode: python; coding: utf-8; -*-
|
||||
# ---------------------------------------------------------------------------##
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
# Copyright (C) 2003 Mt. Hood Playing Card Co.
|
||||
|
@ -19,7 +19,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# ---------------------------------------------------------------------------##
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
# imports
|
||||
|
@ -112,22 +112,20 @@ class _TwoImageCard(_HideableCard):
|
|||
if not self.face_up:
|
||||
self.__back.hide()
|
||||
self.__face.show()
|
||||
##self.tkraise(unhide)
|
||||
# self.tkraise(unhide)
|
||||
self.face_up = 1
|
||||
|
||||
def showBack(self, unhide=1):
|
||||
if self.face_up:
|
||||
self.__face.hide()
|
||||
self.__back.show()
|
||||
##self.tkraise(unhide)
|
||||
# self.tkraise(unhide)
|
||||
self.face_up = 0
|
||||
|
||||
def updateCardBackground(self, image):
|
||||
self.__back.config(image=image)
|
||||
|
||||
|
||||
|
||||
# choose the implementation
|
||||
Card = _TwoImageCard
|
||||
#Card = _OneImageCard # FIXME: this implementation lost any cards (bug?)
|
||||
|
||||
# Card = _OneImageCard # FIXME this implementation lost any cards (bug?)
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
__all__ = ['ColorsDialog']
|
||||
|
||||
# imports
|
||||
from pysollib.mygettext import _, n_
|
||||
## import os, sys
|
||||
import gtk, gobject, pango
|
||||
from pysollib.mygettext import _
|
||||
# import os, sys
|
||||
import gtk
|
||||
import gtk.glade
|
||||
from gtk import gdk
|
||||
|
||||
|
@ -77,7 +77,6 @@ class ColorsDialog:
|
|||
|
||||
dialog.destroy()
|
||||
|
||||
|
||||
def _setColor(self, name, color):
|
||||
label = self.widgets_tree.get_widget(name+'_label')
|
||||
eventbox = self.widgets_tree.get_widget(name+'_eventbox')
|
||||
|
@ -85,7 +84,6 @@ class ColorsDialog:
|
|||
label.set_data('user_data', color)
|
||||
label.set_text(color)
|
||||
|
||||
|
||||
def _changeColor(self, w, name):
|
||||
label = self.widgets_tree.get_widget(name+'_label')
|
||||
color = label.get_data('user_data')
|
||||
|
@ -101,7 +99,6 @@ class ColorsDialog:
|
|||
self._setColor(name, c)
|
||||
dialog.destroy()
|
||||
|
||||
|
||||
def _translateLabels(self):
|
||||
for n in (
|
||||
'label31',
|
||||
|
@ -120,7 +117,6 @@ class ColorsDialog:
|
|||
'label52',
|
||||
'label53',
|
||||
'label79',
|
||||
):
|
||||
):
|
||||
w = self.widgets_tree.get_widget(n)
|
||||
w.set_text(_(w.get_text()))
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ use String::ShellQuote qw/ shell_quote /;
|
|||
|
||||
# my $cmd = shell_quote( 'flake8', '.' );
|
||||
my $cmd = shell_quote( 'flake8',
|
||||
grep { not($_ eq './pysollib/pysoltk.py') } glob('./pysollib/*.py ./pysollib/[cm]*/*.py') );
|
||||
grep { not($_ eq './pysollib/pysoltk.py') } glob('./pysollib/*.py ./pysollib/[cm]*/*.py ./pysollib/pysolgtk/[a-c]*.py') );
|
||||
|
||||
# TEST
|
||||
eq_or_diff( scalar(`$cmd`), '', "flake8 is happy with the code." );
|
||||
|
|
Loading…
Add table
Reference in a new issue