diff options
| author | dherrada <=> | 2020-05-18 18:59:14 -0400 |
|---|---|---|
| committer | dherrada <=> | 2020-05-18 18:59:14 -0400 |
| commit | cf524cb6b19dc971610452986f1ce8d1001d9d7e (patch) | |
| tree | 8a5432900f4a01ef920e00b51d7e88132f3dd6f8 /tools | |
| parent | acf88d7c0089c732222740a26a1d73563d016a13 (diff) | |
extract_pyi no longer raises a TypeError for missing types
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/extract_pyi.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/extract_pyi.py b/tools/extract_pyi.py index d6309212a..7c664d965 100644 --- a/tools/extract_pyi.py +++ b/tools/extract_pyi.py @@ -64,18 +64,16 @@ for module in modules: if j.returns: if 'Any' in j.returns.__dict__.values(): a += f"Missing return type: {j.__dict__['name']} on line {j.__dict__['lineno']}" - if a: - raise TypeError(a) elif isinstance(j, astroid.node_classes.AnnAssign): if 'Any' == j.__dict__['annotation'].__dict__['name']: - raise TypeError(f"missing attribute type on line {j.__dict__['lineno']}") + a = f"missing attribute type on line {j.__dict__['lineno']}" + if a: + print(a) ok += 1 except astroid.exceptions.AstroidSyntaxError as e: e = e.__cause__ traceback.print_exception(type(e), e, e.__traceback__) - except TypeError as err: - print(err) print(f"{ok} ok out of {total}") |
