diff --git a/providers/sftp/src/airflow/providers/sftp/hooks/sftp.py b/providers/sftp/src/airflow/providers/sftp/hooks/sftp.py index 7064bc923d427..33e994daaf9b7 100644 --- a/providers/sftp/src/airflow/providers/sftp/hooks/sftp.py +++ b/providers/sftp/src/airflow/providers/sftp/hooks/sftp.py @@ -755,7 +755,7 @@ async def _get_conn(self) -> asyncssh.SSHClientConnection: if self.known_hosts.lower() == "none": conn_config.update(known_hosts=None) else: - conn_config.update(known_hosts=self.known_hosts) # type: ignore + conn_config.update(known_hosts=self.known_hosts) if self.private_key: _private_key = asyncssh.import_private_key(self.private_key, self.passphrase) conn_config["client_keys"] = [_private_key] diff --git a/providers/sftp/tests/system/sftp/example_sftp_sensor.py b/providers/sftp/tests/system/sftp/example_sftp_sensor.py index cd23e18d7d56a..52ef6d1e4b98e 100644 --- a/providers/sftp/tests/system/sftp/example_sftp_sensor.py +++ b/providers/sftp/tests/system/sftp/example_sftp_sensor.py @@ -46,8 +46,8 @@ def sleep_function(): tags=["example", "sftp"], ) as dag: # [START howto_operator_sftp_sensor_decorator] - @task.sftp_sensor( # type: ignore[attr-defined] - task_id="sftp_sensor", # type: ignore[attr-defined] + @task.sftp_sensor( + task_id="sftp_sensor", path=FULL_FILE_PATH, poke_interval=10, ) diff --git a/providers/sftp/tests/unit/sftp/hooks/test_sftp.py b/providers/sftp/tests/unit/sftp/hooks/test_sftp.py index a99550e3a4550..33b4bdd103412 100644 --- a/providers/sftp/tests/unit/sftp/hooks/test_sftp.py +++ b/providers/sftp/tests/unit/sftp/hooks/test_sftp.py @@ -704,7 +704,7 @@ def __init__(self, host_key: str | None = None, no_host_key_check: bool = False, self.login = "username" self.password = "password" self.extra = f'{{ "no_host_key_check": {no_host_key_check}, "host_key": {host_key} }}' - self.extra_dejson = { # type: ignore + self.extra_dejson = { "no_host_key_check": no_host_key_check, "host_key": host_key, "key_file": "~/keys/my_key",