Sangarshanan / jazzit

if statement can be simplified PYL-R1703
Anti-pattern
Major
4 years ago4 years old
The if statement can be replaced with 'return bool(test)'
12
13def _is_url(text):
14    parsed = urlparse(text)
15    if (parsed.scheme) and (parsed.netloc):16        return True
17    else:
18        return False