Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.44k stars 2.74k forks source link

[Pylint] Python 2 typing syntax is forbidden #31104

Open lmazuel opened 1 year ago

lmazuel commented 1 year ago

The typing comment just below method signature should be forbidden now because we no longer support python 2.

This checker should ensure that the following is not allowed:


def function(self, max_wait_time, **kwargs):

     # type: (int, Any) -> None

     pass

and that inline typing passes:


def function(self, max_wait_time: int, **kwargs: Any) -> None:
     pass
lmazuel commented 10 months ago

Implementing this as the side effect of making sure there is no mismatch between type annotations and the method signature, which is a doc problem right now.