Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def parse_zipcode(self, value):
try:
result = zipcodes.matching(value)
if (len(result) > 1):
return result[0]
else:
return None
except ValueError:
return None
except TypeError:
raise TypeError