`__name__` is reported as being missing from `type` of `NewType`
Describe the Bug
from typing import NewType
Thing = NewType("Thing", int)
ThingType = type[Thing]
def func(x: ThingType ) -> None:
print(x.__name__)
func(Thing)
Python: 3.12
Likely related to https://github.com/facebook/pyrefly/issues/1709, but __name__ is (I think) almost always available so could potentially be special cased to always work?
Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeSIAxlKnHAAQCCiAOuvR-ZjGPWAK7pKACjgwoYADT18iehHQAXAJT0AtAD56AOVzoYcwkbbVaDAELDGy1u07deAoaPFT6AfTkKV6rbv2GxuggkiD8itBwJOSIIADE9ACqEVAQiqR8gpQRenBsbA58uABOALaoiu7o-KXYMMXCsvJKqpr0cIrFtpz0xTCK-MXsYCwg2jV1XfTA%2BAC%2Bo2whIGR9YFCkhIq4pVAUCQAKpKvr7Rg4BPSUepAA5oMVEHqEbAkAyjAw9AAWiorEcIgAPSAlY8daEEo3QEwdCAzC4ShwQFXdC3e45WFFYr0VAAN1Q0FQ2Fgl2uEDuxQeenouGIGKibDIii%2BejUuPqcEe7AAvPRRgBmQgARgATAtgrNQqhshB2QAxaAwChoLB4IhkECzIA
(Only applicable for extension issues) IDE Information
No response
I think it is simply missing from typeshed. I just made a PR. https://github.com/python/typeshed/pull/15092
thanks @guoci ! I'll update our bundled typeshed next week