Closed garfieldnate closed 2 years ago
Thanks for the comment, I think your analysis of why this doesn't work is correct.
I don't use types in personal code so I have no interest in implementing this, but if someone has a PR that's easy to update I could consider it.
Closing since I'm not taking any action on this.
Using PyLance to inspect my code, I get errors when importing from fugashi:
I believe the issue is the same as this one for lxml: because the types are in a native library, PyLance can't analyze them for type information.
The solution is to create a type stubs file. For lxml, there's a separate lxml-stubs package.
Don't know if this is a lot of work or a little bit of work, but I'll open the ticket here in case anyone else encounters the same thing.