From 86d6352047f7d4b252fdc0c7f8941e2b362d9bd9 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 16 Dec 2019 18:27:26 +1000 Subject: [PATCH] add pytype conf file --- pytype.conf | 44 ++++++++++++++++++++++++++++++++++++++++++++ tools/typecheck.sh | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 pytype.conf diff --git a/pytype.conf b/pytype.conf new file mode 100644 index 000000000..89ed2364e --- /dev/null +++ b/pytype.conf @@ -0,0 +1,44 @@ +# NOTE: All relative paths are relative to the location of this file. + +[pytype] + +# Space-separated list of files or directories to exclude. +exclude = + **/*_test.py + **/test_*.py + +# Space-separated list of files or directories to process. +inputs = + anki + +# Keep going past errors to analyze as many files as possible. +keep_going = False + +# Run N jobs in parallel. +jobs = 8 + +# All pytype output goes here. +output = .pytype + +# Paths to source code directories, separated by ':'. +pythonpath = + . + +# Python version (major.minor) of the target code. +python_version = 3.7 + +# Comma separated list of error names to ignore. +disable = +# pyi-error + +# Don't report errors. +report_errors = True + +# Experimental: Infer precise return types even for invalid function calls. +precise_return = False + +# Experimental: solve unknown types to label with structural types. +protocols = False + +# Experimental: Only load submodules that are explicitly imported. +strict_import = False diff --git a/tools/typecheck.sh b/tools/typecheck.sh index e35fb3249..45ca5f1a7 100755 --- a/tools/typecheck.sh +++ b/tools/typecheck.sh @@ -2,4 +2,4 @@ TOOLS="$(cd "`dirname "$0"`"; pwd)" mypy $TOOLS/../anki $TOOLS/../aqt -pytype $TOOLS/../anki +(cd $TOOLS/.. && pytype --config pytype.conf)