KOSASIH / HealthGuard-Refugee-Initiative

if statement can be simplified PYL-R1703
Anti-pattern
Major
5 months ago5 months old
The if statement can be replaced with 'return bool(test)'
 72    )
 73
 74    # Check if the request was successful
 75    if response.status_code == 201: 76        # If the device was integrated successfully, return True
 77        return True
 78    else:
The if statement can be replaced with 'return bool(test)'
 48    )
 49
 50    # Check if the request was successful
 51    if response.status_code == 201: 52        # If the alert was sent successfully, return True
 53        return True
 54    else: