diff --git a/Makefile b/Makefile index 3c2b41ec..b508ff5d 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,35 @@ DEBORIGFILE:=$(DEBUILDDIR)/$(LAPPNAME)_$(VERSION).orig.tar.xz FILESCHECK_URL:=http://localhost/~calvin/ SRCDIR:=${HOME}/src PY_FILES_DIRS:=linkcheck tests *.py linkchecker linkchecker-nagios linkchecker-gui cgi-bin config doc +MYPY_FILES_DIRS:=linkcheck/HtmlParser linkcheck/checker \ + linkcheck/cache linkcheck/configuration linkcheck/director \ + linkcheck/htmlutil linkcheck/logger linkcheck/network \ + linkcheck/bookmarks \ + linkcheck/gui/__init__.py \ + linkcheck/gui/checker.py \ + linkcheck/gui/contextmenu.py \ + linkcheck/gui/debug.py \ + linkcheck/gui/editor.py \ + linkcheck/gui/editor_qsci.py \ + linkcheck/gui/editor_qt.py \ + linkcheck/gui/lineedit.py \ + linkcheck/gui/help.py \ + linkcheck/gui/logger.py \ + linkcheck/gui/options.py \ + linkcheck/gui/properties.py \ + linkcheck/gui/settings.py \ + linkcheck/gui/statistics.py \ + linkcheck/gui/syntax.py \ + linkcheck/gui/updater.py \ + linkcheck/gui/urlmodel.py \ + linkcheck/gui/urlsave.py \ + $(filter-out %2.py,$(wildcard linkcheck/*.py)) \ + cgi-bin/lc.wsgi \ + linkchecker \ + linkchecker-gui \ + linkchecker-nagios \ + *.py + TESTS ?= tests # set test options, eg. to "--verbose" TESTOPTS= @@ -137,41 +166,14 @@ rpm: check: check-copyright check-pofiles -v - py-tabdaddy + py-tabdaddy $(MYPY_FILES_DIRS) py-unittest2-compat tests/ $(MAKE) -C doc check $(MAKE) doccheck $(MAKE) pyflakes doccheck: - py-check-docstrings --force linkcheck/HtmlParser linkcheck/checker \ - linkcheck/cache linkcheck/configuration linkcheck/director \ - linkcheck/htmlutil linkcheck/logger linkcheck/network \ - linkcheck/bookmarks \ - linkcheck/gui/__init__.py \ - linkcheck/gui/checker.py \ - linkcheck/gui/contextmenu.py \ - linkcheck/gui/debug.py \ - linkcheck/gui/editor.py \ - linkcheck/gui/editor_qsci.py \ - linkcheck/gui/editor_qt.py \ - linkcheck/gui/lineedit.py \ - linkcheck/gui/help.py \ - linkcheck/gui/logger.py \ - linkcheck/gui/options.py \ - linkcheck/gui/properties.py \ - linkcheck/gui/settings.py \ - linkcheck/gui/statistics.py \ - linkcheck/gui/syntax.py \ - linkcheck/gui/updater.py \ - linkcheck/gui/urlmodel.py \ - linkcheck/gui/urlsave.py \ - $(filter-out %2.py,$(wildcard linkcheck/*.py)) \ - cgi-bin/lc.wsgi \ - linkchecker \ - linkchecker-gui \ - linkchecker-nagios \ - *.py + py-check-docstrings --force $(MYPY_FILES_DIRS) filescheck: localbuild for out in text html gml sql csv xml gxml dot sitemap; do \ diff --git a/linkcheck/better_exchook.py b/linkcheck/better_exchook2.py similarity index 100% rename from linkcheck/better_exchook.py rename to linkcheck/better_exchook2.py diff --git a/linkcheck/director/console.py b/linkcheck/director/console.py index e37cce8f..8633935e 100644 --- a/linkcheck/director/console.py +++ b/linkcheck/director/console.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2006-2012 Bastian Kleineidam +# Copyright (C) 2006-2013 Bastian Kleineidam # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ from __future__ import print_function import sys import os import time -from .. import i18n, configuration, strformat, better_exchook +from .. import i18n, configuration, strformat, better_exchook2 # Output to stdout and stderr, encoded with the default encoding stderr = i18n.get_encoded_writer(out=sys.stderr) @@ -93,7 +93,7 @@ I can work with ;) . evalue = sys.exc_info()[1] if tb is None: tb = sys.exc_info()[2] - better_exchook.better_exchook(etype, evalue, tb, out=out) + better_exchook2.better_exchook(etype, evalue, tb, out=out) print_app_info(out=out) print_proxy_info(out=out) print_locale_info(out=out)