--disallow-untyped-calls
reports errors in untyped functions
#12912
Labels
bug
mypy got something wrong
--disallow-untyped-calls
reports errors in untyped functions
#12912
Bug Report
Using
--disallow-untyped-calls
and--check-untyped-defs
results in errors about calling untyped functions in a typed context, even when calling from an untyped function.To Reproduce
Test case:
Expected Behavior
Either:
--disallow-untyped-calls
disallows all calls to untyped functions, regardless of whether the current function has type annotations, orActual Behavior
The call to
f
in the above example produces the error "Call to untyped function "f" in typed context".Your Environment
See https://mypy-play.net/?mypy=latest&python=3.10&flags=check-untyped-defs%2Cdisallow-untyped-calls&gist=3350fe27968b29dabc5ef1e207d008ce to reproduce.
This came up in #12901 (specifically the mypy_primer diff had an error here)
The text was updated successfully, but these errors were encountered: