Azure / azure-sdk-tools

Tools repository leveraged by the Azure SDK team.
MIT License
112 stars 177 forks source link

[Pylint] custom linter check for invalid use of @overload #3229

Open tjprescott opened 2 years ago

tjprescott commented 2 years ago

https://mypy-play.net/?mypy=latest&python=3.10&gist=0a3f8bdcedf254e4b9647863e2c834d9

Mypy will catch the above mentioned gist. However, if the return types are removed, Mypy will be totally happy with @overload sync signatures and an async implementation (or vice versa). However, since this isn't the actual purpose of @overload we should check for it. Since mypy doesn't consistently identify this situation, a custom linter check may be most appropriate.

cc/ @annatisch

azure-sdk commented 2 years ago

Label prediction was below confidence level 0.6 for Model:ServiceLabels: 'Storage:0.23540601,Event Hubs:0.08521333,Azure.Core:0.080435924'

azure-sdk commented 2 years ago

Label prediction was below confidence level 0.6 for Model:ServiceLabels: 'Storage:0.23540601,Event Hubs:0.08521333,Azure.Core:0.080435924'

16234397 commented 1 month ago

I'm currently working on this issue :-)