You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/20 08:26:49 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #20930: Fix Mypy "no attribute" errors in `airflow/contrib/sensors`

uranusjr commented on a change in pull request #20930:
URL: https://github.com/apache/airflow/pull/20930#discussion_r788496703



##########
File path: airflow/providers/microsoft/azure/sensors/wasb.pyi
##########
@@ -41,3 +42,7 @@ class WasbBlobSensor(BaseSensorOperator):
         check_options: Optional[dict] = None,
         **kwargs,
     ) -> None: ...
+
+# Adding this public module override to suppress Mypy errors stating
+# "airflow.providers.microsoft.azure.sensors.wasb has no attribute 'WasbPrefixSensor'".
+__all__ = ["WasbBlobSensor", "WasbPrefixSensor"]

Review comment:
       FYI you can put `__all__` in the Python source. It also silences Flake8 so you don’t need `noqa`, which I strongly prefer because `__all__` declares explicitly what are actually expected from the module.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org