Skip to content

Commit 2c22565

Browse files
stubtest: Improve error message for __all__-related errors (#14362)
This error is *only* emitted if `__all__` is included in the stub, so the 'if present' clause is unnecessary Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
1 parent 5e817cd commit 2c22565

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/stubtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def _verify_exported_names(
267267
object_path + ["__all__"],
268268
(
269269
"names exported from the stub do not correspond to the names exported at runtime. "
270-
"This is probably due to things being missing from the stub, or if present, an inaccurate `__all__` in the stub"
270+
"This is probably due to things being missing from the stub or an inaccurate `__all__` in the stub"
271271
),
272272
# Pass in MISSING instead of the stub and runtime objects, as the line numbers aren't very
273273
# relevant here, and it makes for a prettier error message

0 commit comments

Comments
 (0)