Completed
Push — master ( bfd75d...9200b0 )
by Manas
01:53
created

ListTeamsAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %
Metric Value
dl 0
loc 10
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 9 2
1
from lib.base import BaseGithubAction
2
from lib.formatters import team_to_dict
3
4
__all__ = [
5
    'ListTeamsAction'
6
]
7
8
9
class ListTeamsAction(BaseGithubAction):
10
    def run(self, organization):
11
        organization = self._client.get_organization(organization)
12
        teams = organization.get_teams()
13
        result = []
14
        for team in teams:
15
            team = team_to_dict(team=team)
16
            result.append(team)
17
18
        return result
19