PEP-660 support and IDEs

To be blunt here, I personally don’t really agree with the idea that we have to simply not use a basic Python mechanism just because static typing tools can’t cope with it. I thought type annotations were supposed to be optional :frowning:

But as you say, it would be pretty straightforward for backends to generate some form of “type stubs” metadata file and add that to the wheel they generate. If someone wants to create a PEP specifying this (“Metadata to expose type information for packages which use import hooks” - it should probably be a typing PEP rather than a packaging one, much like py.typed was) then backends could add support fairly easily. I would very strongly recommend, though, that the mechanism is made general, rather than being focused on how editables currently does the mapping - we don’t want to go through all this again when someone comes up with a better way to use import hooks (for example, I think setuptools might be looking at their own approach, rather than using what editables does).

Either way, I’m happy to add support to editables if needed.