本文整理汇总了Python中taiga.base.utils.dicts.dict_sum函数的典型用法代码示例。如果您正苦于以下问题:Python dict_sum函数的具体用法?Python dict_sum怎么用?Python dict_sum使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dict_sum函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: client_increment_points
def client_increment_points(self):
self._get_increment_points()
client_increment = self._get_increment_points()["client_increment"]
shared_increment = {
key: value/2 for key, value in self._get_increment_points()["shared_increment"].items()
}
return dict_sum(client_increment, shared_increment)
示例2: _get_user_stories_points
def _get_user_stories_points(self, user_stories):
role_points = [us.role_points.all() for us in user_stories]
flat_role_points = itertools.chain(*role_points)
flat_role_dicts = map(lambda x: {x.role_id: x.points.value if x.points.value else 0}, flat_role_points)
return dict_sum(*flat_role_dicts)
示例3: team_increment_points
def team_increment_points(self):
team_increment = self._get_increment_points()["team_increment"]
shared_increment = {
key: value/2 for key, value in self._get_increment_points()["shared_increment"].items()
}
return dict_sum(team_increment, shared_increment)
示例4: future_client_increment
def future_client_increment(self):
client_increment = self._get_points_increment(True, False)
shared_increment = {key: value / 2 for key, value in self.future_shared_increment.items()}
return dict_sum(client_increment, shared_increment)
示例5: future_team_increment
def future_team_increment(self):
team_increment = self._get_points_increment(False, True)
shared_increment = {key: value / 2 for key, value in self.future_shared_increment.items()}
return dict_sum(team_increment, shared_increment)
示例6: closed_points
def closed_points(self):
return dict_sum(*[ml.closed_points for ml in self.milestones.all()])