@@ -4790,3 +4790,97 @@ tmp/c.py:1: note: (Perhaps setting MYPYPATH or using the "--ignore-missing-impor
47904790[out2]
47914791tmp/c.py:1: error: Cannot find module named 'a.b.c'
47924792tmp/c.py:1: note: (Perhaps setting MYPYPATH or using the "--ignore-missing-imports" flag would help)
4793+
4794+ [case testAddedMissingStubs]
4795+ # flags: --ignore-missing-imports
4796+ from missing import f
4797+ f(int())
4798+ [file missing.pyi.2]
4799+ def f(x: str) -> None: pass
4800+ [out]
4801+ [out2]
4802+ main:3: error: Argument 1 to "f" has incompatible type "int"; expected "str"
4803+
4804+ [case testAddedMissingStubsPackage]
4805+ # flags: --ignore-missing-imports
4806+ import package.missing
4807+ package.missing.f(int())
4808+ [file package/__init__.pyi.2]
4809+ [file package/missing.pyi.2]
4810+ def f(x: str) -> None: pass
4811+ [out]
4812+ [out2]
4813+ main:3: error: Argument 1 to "f" has incompatible type "int"; expected "str"
4814+
4815+ [case testAddedMissingStubsPackageFrom]
4816+ # flags: --ignore-missing-imports
4817+ from package import missing
4818+ missing.f(int())
4819+ [file package/__init__.pyi.2]
4820+ [file package/missing.pyi.2]
4821+ def f(x: str) -> None: pass
4822+ [out]
4823+ [out2]
4824+ main:3: error: Argument 1 to "f" has incompatible type "int"; expected "str"
4825+
4826+ [case testAddedMissingStubsPackagePartial]
4827+ # flags: --ignore-missing-imports
4828+ import package.missing
4829+ package.missing.f(int())
4830+ [file package/__init__.pyi]
4831+ [file package/missing.pyi.2]
4832+ def f(x: str) -> None: pass
4833+ [out]
4834+ [out2]
4835+ main:3: error: Argument 1 to "f" has incompatible type "int"; expected "str"
4836+
4837+ [case testAddedMissingStubsPackagePartialGetAttr]
4838+ import package.missing
4839+ package.missing.f(int())
4840+ [file package/__init__.pyi]
4841+ from typing import Any
4842+ def __getattr__(attr: str) -> Any: ...
4843+ [file package/missing.pyi.2]
4844+ def f(x: str) -> None: pass
4845+ [out]
4846+ [out2]
4847+ main:2: error: Argument 1 to "f" has incompatible type "int"; expected "str"
4848+
4849+ [case testAddedMissingStubsIgnore]
4850+ from missing import f # type: ignore
4851+ f(int())
4852+ [file missing.pyi.2]
4853+ def f(x: str) -> None: pass
4854+ [out]
4855+ [out2]
4856+ main:2: error: Argument 1 to "f" has incompatible type "int"; expected "str"
4857+
4858+ [case testAddedMissingStubsIgnorePackage]
4859+ import package.missing # type: ignore
4860+ package.missing.f(int())
4861+ [file package/__init__.pyi.2]
4862+ [file package/missing.pyi.2]
4863+ def f(x: str) -> None: pass
4864+ [out]
4865+ [out2]
4866+ main:2: error: Argument 1 to "f" has incompatible type "int"; expected "str"
4867+
4868+ [case testAddedMissingStubsIgnorePackageFrom]
4869+ from package import missing # type: ignore
4870+ missing.f(int())
4871+ [file package/__init__.pyi.2]
4872+ [file package/missing.pyi.2]
4873+ def f(x: str) -> None: pass
4874+ [out]
4875+ [out2]
4876+ main:2: error: Argument 1 to "f" has incompatible type "int"; expected "str"
4877+
4878+ [case testAddedMissingStubsIgnorePackagePartial]
4879+ import package.missing # type: ignore
4880+ package.missing.f(int())
4881+ [file package/__init__.pyi]
4882+ [file package/missing.pyi.2]
4883+ def f(x: str) -> None: pass
4884+ [out]
4885+ [out2]
4886+ main:2: error: Argument 1 to "f" has incompatible type "int"; expected "str"
0 commit comments