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, data=None):
"""
Args:
data(:obj:`json`, optional): JSON object representing user object
"""
if data:
User.__init__(self, data["user"])
self.paid_share = data["paid_share"]
self.owed_share = data["owed_share"]
self.net_balance = data["net_balance"]
def __init__(self, data=None):
"""
Args:
data(:obj:`json`, optional): JSON object representing friend user object
"""
User.__init__(self, data)
if data:
if 'updated_at' in data:
self.updated_at = data["updated_at"]
else:
self.updated_at = None
self.balances = []
for balance in data["balance"]:
self.balances.append(Balance(balance))
self.groups = []
if "groups" in data:
for group in data["groups"]:
self.groups.append(Group.FriendGroup(group))
def __init__(self, data=None):
"""
Args:
data(:obj:`json`, optional): JSON object representing current user object
"""
User.__init__(self, data)
self.default_currency = data["default_currency"]
self.locale = data["locale"]
self.date_format = data["date_format"]
self.default_group_id = data["default_group_id"]