Skip to content

Commit

Permalink
stubtest: Improve error message for __all__-related errors (#14362)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
AlexWaygood and hauntsaninja authored Dec 29, 2022
1 parent 5e817cd commit 2c22565
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def _verify_exported_names(
object_path + ["__all__"],
(
"names exported from the stub do not correspond to the names exported at runtime. "
"This is probably due to things being missing from the stub, or if present, an inaccurate `__all__` in the stub"
"This is probably due to things being missing from the stub or an inaccurate `__all__` in the stub"
),
# Pass in MISSING instead of the stub and runtime objects, as the line numbers aren't very
# relevant here, and it makes for a prettier error message
Expand Down

0 comments on commit 2c22565

Please sign in to comment.