Closed
Description
I'm running into a confusing error when using mypy to check a project using PyYAML.
Relevant code:
raw = yaml.load(some_str, Loader=yaml.FullLoader)
Error message (from mypy --strict
):
error: Call to untyped function "load" in typed context
Yet the typeshed has:
def load(stream: Union[str, IO[str]], Loader=...) -> Any: ...
Versions:
• OS: macOS 10.14.3
• Python: 3.7.2 (installed via Homebrew)
• Pipenv: 2018.11.26
• mypy: 0.670
• PyYAML: 5.1
(If this belongs in the mypy repo, I'm happy to move it.)