mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
flake8
This commit is contained in:
parent
a54edfa5d2
commit
db66722d35
2 changed files with 19 additions and 18 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- mode: python; coding: utf-8; -*-
|
# -*- mode: python; coding: utf-8; -*-
|
||||||
# ---------------------------------------------------------------------------##
|
# ---------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
|
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
|
||||||
# Copyright (C) 2003 Mt. Hood Playing Card Co.
|
# Copyright (C) 2003 Mt. Hood Playing Card Co.
|
||||||
|
@ -19,21 +19,15 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# ---------------------------------------------------------------------------##
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
__all__ = ['HTMLViewer']
|
__all__ = ['HTMLViewer']
|
||||||
|
|
||||||
# imports
|
# imports
|
||||||
import os, sys
|
import os
|
||||||
import formatter
|
import sys
|
||||||
import Tkinter
|
import Tkinter
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
d = os.path.abspath(os.path.join(sys.path[0], '..', '..'))
|
|
||||||
sys.path.append(d)
|
|
||||||
import gettext
|
|
||||||
gettext.install('pysol', d, unicode=True)
|
|
||||||
|
|
||||||
# PySol imports
|
# PySol imports
|
||||||
from pysollib.mygettext import _
|
from pysollib.mygettext import _
|
||||||
from pysollib.mfxutil import Struct
|
from pysollib.mfxutil import Struct
|
||||||
|
@ -42,7 +36,14 @@ from pysollib.mfxutil import Struct
|
||||||
from tkwidget import MfxMessageDialog
|
from tkwidget import MfxMessageDialog
|
||||||
from statusbar import HtmlStatusbar
|
from statusbar import HtmlStatusbar
|
||||||
|
|
||||||
from pysollib.ui.tktile.tkhtml import Base_HTMLViewer, REMOTE_PROTOCOLS, tkHTMLWriter, tkHTMLParser
|
from pysollib.ui.tktile.tkhtml import Base_HTMLViewer
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
d = os.path.abspath(os.path.join(sys.path[0], '..', '..'))
|
||||||
|
sys.path.append(d)
|
||||||
|
import gettext
|
||||||
|
gettext.install('pysol', d, unicode=True)
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# *
|
# *
|
||||||
|
@ -61,13 +62,14 @@ class HTMLViewer(Base_HTMLViewer):
|
||||||
self.home = home
|
self.home = home
|
||||||
self.url = None
|
self.url = None
|
||||||
self.history = Struct(
|
self.history = Struct(
|
||||||
list = [],
|
list=[],
|
||||||
index = 0,
|
index=0,
|
||||||
)
|
)
|
||||||
self.visited_urls = []
|
self.visited_urls = []
|
||||||
self.images = {} # need to keep a reference because of garbage collection
|
# need to keep a reference because of garbage collection
|
||||||
|
self.images = {}
|
||||||
self.defcursor = parent["cursor"]
|
self.defcursor = parent["cursor"]
|
||||||
##self.defcursor = 'xterm'
|
# self.defcursor = 'xterm'
|
||||||
self.handcursor = "hand2"
|
self.handcursor = "hand2"
|
||||||
|
|
||||||
# create buttons
|
# create buttons
|
||||||
|
@ -135,7 +137,6 @@ def tkhtml_main(args):
|
||||||
top.mainloop()
|
top.mainloop()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sys.exit(tkhtml_main(sys.argv))
|
sys.exit(tkhtml_main(sys.argv))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ my %skip =
|
||||||
|
|
||||||
# my $cmd = shell_quote( 'flake8', '.' );
|
# my $cmd = shell_quote( 'flake8', '.' );
|
||||||
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-sw],ta,ti,to}*.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-sw],ta,ti,to,tkhtml}*.py ./pysollib/ui/tktile/*.py') );
|
||||||
|
|
||||||
# TEST
|
# TEST
|
||||||
eq_or_diff( scalar(`$cmd`), '', "flake8 is happy with the code." );
|
eq_or_diff( scalar(`$cmd`), '', "flake8 is happy with the code." );
|
||||||
|
|
Loading…
Add table
Reference in a new issue