Skip to content

Commit

Permalink
static checks fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Adaverse committed Jul 9, 2023
1 parent 8236310 commit 1db5f3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions docs/apache-airflow-providers-sftp/sensors/sftp_sensor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,3 @@ Whatever returned by the python callable is put into XCom.
:dedent: 4
:start-after: [START howto_operator_sftp_sensor_decorator]
:end-before: [END howto_operator_sftp_sensor_decorator]


8 changes: 4 additions & 4 deletions tests/system/providers/sftp/example_sftp_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import os
from datetime import datetime

from airflow.models import DAG
from airflow.decorators import task
from airflow.models import DAG
from airflow.providers.sftp.sensors.sftp import SFTPSensor
from airflow.providers.ssh.operators.ssh import SSHOperator

Expand All @@ -37,6 +37,7 @@ def sleep_function():

time.sleep(60)


with DAG(
"example_sftp_sensor",
schedule="@once",
Expand All @@ -48,13 +49,12 @@ def sleep_function():
# [START howto_operator_sftp_sensor_decorator]
@task.sftp_sensor(task_id="sftp_sensor", path=FULL_FILE_PATH, poke_interval=10)
def sftp_sensor_decorator():
print(f"Files were successfully found!")
print("Files were successfully found!")
# add your logic
return "done"


# [END howto_operator_sftp_sensor_decorator]

remove_file_task_start = SSHOperator(
task_id="remove_file_start",
command=f"rm {FULL_FILE_PATH} || true",
Expand Down

0 comments on commit 1db5f3a

Please sign in to comment.