Skip to content

Conversation

@tungol
Copy link
Contributor

@tungol tungol commented Dec 13, 2024

http.HTTPStatus: https://github.com/python/cpython/blob/ba2d2fda93a03a91ac6cdff319fd23ef51848d51/Lib/http/__init__.py#L26

cached_property.__set__ is needed specifically for pyright; I don't see any way around it.

I played around a little with Never as a return type for an overload of hmac.new. It works, and it's accurate, but mypy doesn't raise an error on that specifically. You're likely to get related errors when you try to use the result, but they'll be less clear about what's going on than the current errors. I think it's too much of a worse experience to go for.

@github-actions

This comment has been minimized.

@tungol
Copy link
Contributor Author

tungol commented Dec 13, 2024

optparse.Values is another class with arbitrary attributes at runtime, so that's don't fix.

@tungol
Copy link
Contributor Author

tungol commented Dec 13, 2024

tkinter.Misc.after was deliberately changed away from matching the runtime last year, and nothing is likely to change there. Reference: #11013

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JelleZijlstra JelleZijlstra merged commit 364fd7d into python:main Dec 13, 2024
63 checks passed
@tungol tungol deleted the nofix branch December 13, 2024 23:17
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