From 0876e085471d5e243f2b00ac191036f650cd44b1 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Mon, 17 Apr 2017 12:23:57 +0300 Subject: [PATCH] flake8 . --- pysollib/pysolgtk/card.py | 12 +++++------- pysollib/pysolgtk/colorsdialog.py | 12 ++++-------- tests/style/py-flake8.t | 2 +- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/pysollib/pysolgtk/card.py b/pysollib/pysolgtk/card.py index 1d57434b..2ccd0a6e 100644 --- a/pysollib/pysolgtk/card.py +++ b/pysollib/pysolgtk/card.py @@ -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 . # -# ---------------------------------------------------------------------------## +# --------------------------------------------------------------------------- # 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?) diff --git a/pysollib/pysolgtk/colorsdialog.py b/pysollib/pysolgtk/colorsdialog.py index 62103117..223ef90f 100644 --- a/pysollib/pysolgtk/colorsdialog.py +++ b/pysollib/pysolgtk/colorsdialog.py @@ -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())) - diff --git a/tests/style/py-flake8.t b/tests/style/py-flake8.t index 18e2e136..c15171b0 100644 --- a/tests/style/py-flake8.t +++ b/tests/style/py-flake8.t @@ -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." );