Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(
self, id, city=None, state=None, country=None, latitude=None, longitude=None
):
self.id = id
self.city = city
self.state = state
self.country = country
self.position = position(latitude, longitude)
if self.state:
self.name = "%s, %s" % (self.city, self.state)
else:
self.name = self.city