pyrefly icon indicating copy to clipboard operation
pyrefly copied to clipboard

Improve representation for tuples when used in base class

Open yangdanny97 opened this issue 9 months ago • 1 comments

Describe the Bug

When we have something that extends a heterogeneous concrete tuple like tuple[int, str] in a base class list or the 2nd arg to NewType, it gets converted to the class representation.

Sandbox Link

https://pyrefly.org/sandbox/?code=MQAg6gpgNgxg9gWwiALnVALZAFAngJwgDMpcQBlAQwDsATAIzgA8AaTASwGcQuRKQADpQDmEAFCgA7lkIhccAK4gYNEJPzsUENpwyVZNWiCgR91PowUpUuAe2rCe5vCgxxqAOgkSQACQgGBsqKAiYgRKYoCoTccEQc3JyGjEwAXD4AtCAA4hDWhJRQGSjsSDYCyDBYMADW9o4REAyUtZkgAKqcyIQAbqZQAPoothAAFACUqOj2nBUw1vYR+IRGwxWcbRBMFRpI1NaSmhiYyACSACIAouGR0RDcrpQHyJwKAgJw+NajEB7CHnwrHB4AhQnltCBhHBitDaMR7Jp2O42G4+vg2HkYOM2mANFo+HQQPgFM5cK53ME4SBaOxCPNSE45Ip8CB6Pg4JIuvgxGIiOyEOV6jxQZ9rAAqHkwKCUTjcABicDgoyiYIA2vYUDoUPgALrjdIgQ2CGUbXmKkAAXhACqV2LSqDeJnV+y1ust4UVYlwqQdas42pAAB8nJqQB5wzr3URFUA

(Only applicable for extension issues) IDE Information

No response

yangdanny97 avatar May 19 '25 14:05 yangdanny97

related to https://github.com/facebook/pyrefly/issues/110

yangdanny97 avatar May 24 '25 13:05 yangdanny97

Hi @yangdanny97, I can work on this. I still haven't got a clear cut idea how I can fix this. But I'll try something, and I can get back to you after that.

krathul avatar Jul 15 '25 07:07 krathul

Ah sorry, I forgot to mark https://github.com/facebook/pyrefly/issues/623 as a duplicate. I have a fix ready for that which will also close this issue.

@krathul thanks for volunteering :) please feel free to pick up another issue.

yangdanny97 avatar Jul 15 '25 11:07 yangdanny97