Merge pull request #3255 from ciscorn/fix-rtd

Fix Read the Docs bulid failing
This commit is contained in:
Jeff Epler 2020-08-10 11:59:39 -05:00 committed by GitHub
commit ce911c5f50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -8,6 +8,10 @@
version: 2
submodules:
include:
- extmod/ulab
python:
version: 3
install:

View File

@ -45,7 +45,10 @@ def find_stub_issues(tree):
if isinstance(node.value, ast.Constant) and node.value.value == Ellipsis:
yield ("WARN", f"Unnecessary Ellipsis assignment (= ...) on line {node.lineno}.")
elif isinstance(node, ast.arguments):
for arg_node in (node.args + node.posonlyargs + node.kwonlyargs):
allargs = list(node.args + node.kwonlyargs)
if sys.version_info >= (3, 8):
allargs.extend(node.posonlyargs)
for arg_node in allargs:
if not is_typed(arg_node.annotation) and (arg_node.arg != "self" and arg_node.arg != "cls"):
yield ("WARN", f"Missing argument type: {arg_node.arg} on line {arg_node.lineno}")
if node.vararg and not is_typed(node.vararg.annotation, allow_any=True):