Skip to content

Stubtest: Improve error message for __all__-related errors#14362

Merged
hauntsaninja merged 2 commits intopython:masterfrom
AlexWaygood:stubtest-error-nit
Dec 29, 2022
Merged

Stubtest: Improve error message for __all__-related errors#14362
hauntsaninja merged 2 commits intopython:masterfrom
AlexWaygood:stubtest-error-nit

Conversation

@AlexWaygood
Copy link
Copy Markdown
Member

This error is only emitted if __all__ is included in the stub, so the 'if present' clause is unnecessary

Comment thread mypy/stubtest.py Outdated
Copy link
Copy Markdown
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I was going for a short way to talk about the __all__: list[str] case. But agree that the current wording doesn't really communicate that and if it's just confusing, better to remove it

@hauntsaninja hauntsaninja merged commit 2c22565 into python:master Dec 29, 2022
@AlexWaygood AlexWaygood deleted the stubtest-error-nit branch December 29, 2022 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants