beartype / plum

Multiple dispatch in Python
https://beartype.github.io/plum
MIT License
497 stars 22 forks source link

Fix "overload" is not exported warning #128

Closed yukinarit closed 4 months ago

yukinarit commented 4 months ago

Hi I found importing new "overload" function produces the following warning.

image

coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 7430945664


Totals Coverage Status
Change from base Build 7422135953: 0.0%
Covered Lines: 1096
Relevant Lines: 1129

💛 - Coveralls
wesselb commented 4 months ago

Hey @yukinarit! Thanks for submitting this PR. :)

I'm slightly confused as to why this would solve the error, because overload should now be exported by __init__.py. Nevertheless, I think merging your change would be good anyway since get_overloads is then also directly accessible from __init__.py. I'll therefore merge this right away!

PhilipVinc commented 4 months ago

I think the error was caused by a function having the same name as the module/file which confused pylance. Be aware that type checkers should ignore all * imports, even if pylance for the time being does check up on them.

wesselb commented 4 months ago

@PhilipVinc Ah, thanks for the clarification. :) That's good to know.