-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link to mypy's error code documentation #58
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR 🥳
I have some minor changes. I think we can directly return a CodeDescription
from the helper function. That would also mean that the case where we don't have a link will give the same old result as before.
Co-authored-by: Karthik Nadig <kanadig@microsoft.com>
@Avasam Looks like there is a formatting issue. Can you run |
With python/mypy#15435 and python/mypy#15437, up to you if you wanna update the logic in a separate PR or wait for the next mypy release so we can point to stable in this PR using consistent anchors. Or an in-between: point to latest for now. |
@Avasam We can point to the latest. With the assumption that the error messages are not going to change significantly. |
Sorry to do an update after an approval, but this is much more maintainable. |
Closes #57
I wish there was a better way to map code to url for maintainability, I have opened a doc feature request with mypy to have better way to programmatically link to the codes' doc. Both for better anchors and a way that doesn't span 2 pages.python/mypy#15431Demo:
Which links to https://mypy.readthedocs.io/en/latest/_refs.html#code-import
Other potential improvements: