awslabs / python-deequ

Python API for Deequ
Apache License 2.0
691 stars 132 forks source link

Incorrect type hint in VerificationSuite.addAnomalyCheck #34

Closed ashwin153 closed 3 years ago

ashwin153 commented 3 years ago

Currently, the signature of VerificationSuite.addAnomalyCheck is:

https://github.com/awslabs/python-deequ/blob/522f9bfb3bec994ab77a37788409ab35153810d0/pydeequ/verification.py#L160

However, the tests call this function with an analyzer_func such as Size() which is a pydeequ.analyzers._AnalyzerObject. For example,

https://github.com/awslabs/python-deequ/blob/522f9bfb3bec994ab77a37788409ab35153810d0/tests/test_anomaly_detection.py#L87

Shouldn't the signature of this method be changed to:

def addAnomalyCheck(self, anomaly, analyzer: _AnalyzerObject, anomalyCheckConfig=None):