-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
stubs: false negativeType checkers do not report an error, but shouldType checkers do not report an error, but should
Description
At least in recent Python versions it can return None
: https://github.com/python/cpython/blob/0705ec8a149e27023b0420ae0366d16255f6c9f7/Lib/ast.py#L270-L293
typed_ast
also seems to be affected, but has Optional[bytes]
already:
stdlib/3/ast.pyi
194:def get_docstring(node: AST, clean: bool = ...) -> str: ...
third_party/3/typed_ast/ast27.pyi
15:def get_docstring(node: AST, clean: bool = ...) -> Optional[bytes]: ...
third_party/3/typed_ast/ast3.pyi
15:def get_docstring(node: AST, clean: bool = ...) -> str: ...
stdlib/2/ast.pyi
16:def get_docstring(node: AST, clean: bool = ...) -> str: ...
(@ 675ab77)
Metadata
Metadata
Assignees
Labels
stubs: false negativeType checkers do not report an error, but shouldType checkers do not report an error, but should