kani5hk commented on issue #4878: [AIRFLOW-4046] Added validations for poke_interval & timeout for Airflow Sensor URL: https://github.com/apache/airflow/pull/4878#issuecomment-471164498 > I'm still thinking if we should have `isinstance(poke_interval, numbers.Number)` or `isinstance(poke_interval, (int, float))`? Because complex numbers are also `numbers.Number`. > > ```python > isinstance(complex(1, 3), numbers.Number) > # True > > complex(1,3) < 0 > # TypeError: '<' not supported between instances of 'complex' and 'int' > ``` @XD-DENG I think it makes sense. Also python doc for the time.sleep says _The argument may be a floating point number to indicate a more precise sleep time._
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
