From 8b93b1853b53802a2ec8c0e39f4cdf7811e85760 Mon Sep 17 00:00:00 2001 From: Geoffrey Sneddon Date: Tue, 11 Jun 2013 17:29:51 +0100 Subject: [PATCH] Fix #57: flake8-run.sh should return non-zero on failure This adds __all__ to utils.py to explicitly export default_etree --- flake8-run.sh | 3 +++ html5lib/utils.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/flake8-run.sh b/flake8-run.sh index 37f892a7..027f0bbb 100755 --- a/flake8-run.sh +++ b/flake8-run.sh @@ -7,5 +7,8 @@ fi if [[ $FLAKE == "true" ]]; then find html5lib/ -name '*.py' -and -not -name 'constants.py' -print0 | xargs -0 flake8 --ignore=E501 + flake1=$? flake8 --max-line-length=99 --ignore=E126 html5lib/constants.py + flake2=$? + exit $[$flake1 || $flake2] fi diff --git a/html5lib/utils.py b/html5lib/utils.py index 4e8559db..2f41f4df 100644 --- a/html5lib/utils.py +++ b/html5lib/utils.py @@ -8,6 +8,10 @@ import xml.etree.ElementTree as default_etree +__all__ = ["default_etree", "MethodDispatcher", "isSurrogatePair", + "surrogatePairToCodepoint", "moduleFactoryFactory"] + + class MethodDispatcher(dict): """Dict with 2 special properties: