weather.py
def check_rain_today(self):
        """Check if it will rain today."""
        hourly_forecast = self.get_hourly_forecast()
        # only care about next 12 hours
        hourly_forecast = hourly_forecast[:12]
        # weather conditions smaller than 700 mean rain, snow, storm, etc
        return any(hourly['weather'][0]['id'] < 700 for hourly in hourly_forecast)
Check if it will rain today.
Check if it will rain today.
Check if it will rain today .
def check_rain_today(self):
        hourly_forecast = self.get_hourly_forecast()
        hourly_forecast = hourly_forecast[:12]
        return any(hourly['weather'][0]['id'] < 700 for hourly in hourly_forecast)
def check_rain_today ( self ) : hourly_forecast = self . get_hourly_forecast ( ) hourly_forecast = hourly_forecast [ : 12 ] return any ( hourly [ 'weather' ] [ 0 ] [ 'id' ] < 700 for hourly in hourly_forecast )
Check if it will rain today.
Check if it will rain today .
"""Check if it will rain today.""" # only care about next 12 hours # weather conditions smaller than 700 mean rain, snow, storm, etc
self