Skip to content

Commit cc2dd57

Browse files
committed
fix mypy and black
1 parent a3988f2 commit cc2dd57

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gh_org_mgr/_gh_org.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,15 @@ def _get_all_repo_permissions_for_team_and_parents(self, team_name: str, team_di
497497
"Checking for repository permissions of %s's parent team %s", team_name, parent
498498
)
499499
parent_team_dict = self.configured_teams[parent]
500+
501+
# Handle empty parent dict
502+
if not parent_team_dict:
503+
break
504+
505+
# Get repo permissions and potential parent, and add it
500506
repo_perm, parent = self._get_direct_repo_permissions_of_team(
501507
team_dict=parent_team_dict
502508
)
503-
504509
for repo, perm in repo_perm.items():
505510
# Add (highest) repo permission
506511
all_repo_perms[repo] = self._get_highest_permission(
@@ -640,6 +645,7 @@ def _permission1_higher_than_permission2(self, permission1: str, permission2: st
640645

641646
def get_rank(permission):
642647
return perms_ranking.index(permission) if permission in perms_ranking else 99
648+
643649
rank_permission1 = get_rank(permission1)
644650
rank_permission2 = get_rank(permission2)
645651

0 commit comments

Comments
 (0)