title: Airflow Python Operator with a. return type
body: <p>I have a python operator in my DAG. The python callable function is returning a bool value. But, when I run the DAG, I get the below error.</p>
  <blockquote>
  <p>TypeError: 'bool' object is not callable</p>
  </blockquote>
  <p>I modified the function to return nothing but then again I keep getting the below error</p>
  <blockquote>
  <p>ERROR - 'NoneType' object is not callable</p>
  </blockquote>
  <p>Below is my dag</p>
  <pre><code>def check_poke(threshold,sleep_interval):
  flag=snowflake_poke(1000,10).poke()
  #print(flag)
  return flag
  
  dependency = PythonOperator(
  task_id='poke_check',
  #python_callable=check_poke(129600,600),
  provide_context=True,
  python_callable=check_poke(129600,600),
  dag=dag)
  
  end = BatchEndOperator(
  queue=QUEUE,
  dag=dag)
  
  start.set_downstream(dependency)
  dependency.set_downstream(end)
  </code></pre>
  <p>Not able to figure out what it is that I am missing. Can someone help me out on this...Fairly new to airflow.</p>
  <p>I edited the python operator in the dag as below</p>
  <pre><code>dependency = PythonOperator(
  task_id='poke_check',
  provide_context=True,
  python_callable=check_poke(129600,600),
  dag=dag)
  </code></pre>
  <p>But now, I get a different error.</p>
  <pre><code>Traceback (most recent call last):
  File &quot;/usr/local/lib/python2.7/dist-packages/airflow/models.py&quot;, line 1245, in run
      result = task_copy.execute(context=context)
  File &quot;/usr/local/lib/python2.7/dist-packages/airflow/operators/python_operator.py&quot;, line 66, in execute
      return_value = self.python_callable(*self.op_args, **self.op_kwargs)
  TypeError: () takes no arguments (25 given)
  [2019-02-15 05:30:25,375] {models.py:1298} INFO - Marking task as UP_FOR_RETRY
  [2019-02-15 05:30:25,393] {models.py:1327} ERROR - () takes no arguments (25 given)
  </code></pre>