@@ -1611,14 +1611,22 @@ from other_module_2 import a # E: Module "other_module_2" does not explicitly e
16111611reveal_type(a) # N: Revealed type is "builtins.int"
16121612
16131613import other_module_2
1614- # TODO: this should also reveal builtins.int, see #13965
1615- reveal_type(other_module_2.a) # E: "object" does not explicitly export attribute "a" [attr-defined] \
1616- # N: Revealed type is "Any"
1614+ reveal_type(other_module_2.a) # E: Module "other_module_2" does not explicitly export attribute "a" [attr-defined] \
1615+ # N: Revealed type is "builtins.int"
1616+
1617+ from other_module_2 import b # E: Module "other_module_2" does not explicitly export attribute "b" [attr-defined]
1618+ reveal_type(b) # N: Revealed type is "def (a: builtins.int) -> builtins.str"
1619+
1620+ import other_module_2
1621+ reveal_type(other_module_2.b) # E: Module "other_module_2" does not explicitly export attribute "b" [attr-defined] \
1622+ # N: Revealed type is "def (a: builtins.int) -> builtins.str"
16171623
16181624[file other_module_1.py]
16191625a = 5
1626+ def b(a: int) -> str: ...
16201627[file other_module_2.py]
1621- from other_module_1 import a
1628+ from other_module_1 import a, b
1629+ [builtins fixtures/module.pyi]
16221630
16231631[case testNoImplicitReexportRespectsAll]
16241632# flags: --no-implicit-reexport
@@ -1649,11 +1657,15 @@ __all__ = ('b',)
16491657[case testNoImplicitReexportGetAttr]
16501658# flags: --no-implicit-reexport --python-version 3.7
16511659from other_module_2 import a # E: Module "other_module_2" does not explicitly export attribute "a"
1660+ reveal_type(a) # N: Revealed type is "builtins.int"
1661+ from other_module_2 import b # E: Module "other_module_2" does not explicitly export attribute "b"
1662+ reveal_type(b) # N: Revealed type is "builtins.str"
16521663[file other_module_1.py]
1653- from typing import Any
1654- def __getattr__(name: str) -> Any : ...
1664+ b: str = "asdf"
1665+ def __getattr__(name: str) -> int : ...
16551666[file other_module_2.py]
1656- from other_module_1 import a
1667+ from other_module_1 import a, b
1668+ def __getattr__(name: str) -> bytes: ...
16571669[builtins fixtures/tuple.pyi]
16581670
16591671[case textNoImplicitReexportSuggestions]
0 commit comments