Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion providers/sftp/src/airflow/providers/sftp/hooks/sftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions providers/sftp/tests/system/sftp/example_sftp_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion providers/sftp/tests/unit/sftp/hooks/test_sftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down