diff --git a/build/doc.sh b/build/doc.sh index 961c59684..32177f837 100755 --- a/build/doc.sh +++ b/build/doc.sh @@ -193,7 +193,7 @@ split-and-render() { local css_files="$web_url/base.css $web_url/manual.css $web_url/toc.css $web_url/language.css $web_url/code.css" - doctools/split_doc.py \ + PYTHONPATH='.:vendor' doctools/split_doc.py \ -v build_timestamp="$TIMESTAMP" \ -v oil_version="$OIL_VERSION" \ -v css_files="$css_files" \ diff --git a/devtools/types.sh b/devtools/types.sh index 4f4553eae..a807ba706 100755 --- a/devtools/types.sh +++ b/devtools/types.sh @@ -61,13 +61,20 @@ check-mycpp() { } check-doctools() { - local -a files=( - $(for x in doctools/*.py; do echo $x; done | grep -v '_test.py' ) - lazylex/html.py - ) + if false; then + local -a files=( + $(for x in doctools/*.py; do echo $x; done | grep -v '_test.py' ) + lazylex/html.py + ) + else + #local -a files=( lazylex/html.py ) + #local -a files=( doctools/help_gen.py ) + local -a files=( doctools/ul_table.py lazylex/html.py ) + fi + # 777 errors before pyann # 583 afterward - local -a flags=( --py2 --no-strict-optional --strict ) + local -a flags=( --py2 --no-strict-optional --strict --follow-imports=silent ) #local -a flags=( --py2 --no-strict-optional ) set -x diff --git a/doctools/util.py b/doctools/util.py index f78487a2b..986913137 100644 --- a/doctools/util.py +++ b/doctools/util.py @@ -4,13 +4,13 @@ import sys -# many tools import this, causes ImportError -# the oilshell.org/ repo also imports this -#from typing import Any +# Note: from typing import Any causes ImportError when PYTHONPATH is not .:vendor +# So we import from vendor.typing which is a little inconsistent +from vendor.typing import Any def log(msg, *args): - # disabled type: (str, Any) -> None + # type: (str, Any) -> None if args: msg = msg % args print(msg, file=sys.stderr)