Skip to content

Commit

Permalink
fix mypy and black
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmehl committed Jul 12, 2024
1 parent a3988f2 commit cc2dd57
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gh_org_mgr/_gh_org.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,15 @@ def _get_all_repo_permissions_for_team_and_parents(self, team_name: str, team_di
"Checking for repository permissions of %s's parent team %s", team_name, parent
)
parent_team_dict = self.configured_teams[parent]

# Handle empty parent dict
if not parent_team_dict:
break

# Get repo permissions and potential parent, and add it
repo_perm, parent = self._get_direct_repo_permissions_of_team(
team_dict=parent_team_dict
)

for repo, perm in repo_perm.items():
# Add (highest) repo permission
all_repo_perms[repo] = self._get_highest_permission(
Expand Down Expand Up @@ -640,6 +645,7 @@ def _permission1_higher_than_permission2(self, permission1: str, permission2: st

def get_rank(permission):
return perms_ranking.index(permission) if permission in perms_ranking else 99

rank_permission1 = get_rank(permission1)
rank_permission2 = get_rank(permission2)

Expand Down

0 comments on commit cc2dd57

Please sign in to comment.