Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mypy/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def _verify_exported_names(
if not (names_in_runtime_not_stub or names_in_stub_not_runtime):
return
yield Error(
object_path,
object_path + ["__all__"],
(
"names exported from the stub do not correspond to the names exported at runtime. "
"This is probably due to an inaccurate `__all__` in the stub or things being missing from the stub."
Comment thread
sobolevn marked this conversation as resolved.
Outdated
Expand Down
4 changes: 2 additions & 2 deletions mypy/test/teststubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ def test_all_in_stub_not_at_runtime(self) -> Iterator[Case]:

@collect_cases
def test_all_in_stub_different_to_all_at_runtime(self) -> Iterator[Case]:
# We *should* emit an error with the module name itself,
# We *should* emit an error with the module name itself + __all__,
# if the stub *does* define __all__,
# but the stub's __all__ is inconsistent with the runtime's __all__
yield Case(
Expand All @@ -1040,7 +1040,7 @@ def test_all_in_stub_different_to_all_at_runtime(self) -> Iterator[Case]:
__all__ = []
foo = 'foo'
""",
error="",
error="__all__",
)

@collect_cases
Expand Down