Skip to content

Commit

Permalink
chore: formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
renatav committed Aug 28, 2023
1 parent 0999e5f commit 6d076ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions taf/api/roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,9 @@ def _initialize_roles_and_keystore(roles_key_infos, keystore, enter_info=True):
if roles_key_infos is not None and type(roles_key_infos) == str:
roles_key_infos_path = Path(roles_key_infos)
if roles_key_infos_path.is_file() and "keystore" in roles_key_infos_dict:
keystore_path = Path(roles_key_infos_dict["keystore"]).expanduser().resolve()
keystore_path = (
Path(roles_key_infos_dict["keystore"]).expanduser().resolve()
)
if not keystore_path.is_absolute():
keystore_path = (
roles_key_infos_path.parent / keystore_path
Expand Down Expand Up @@ -595,7 +597,7 @@ def _create_delegations(
for role_name, role_info in roles_infos.items():
if "delegations" in role_info:
delegations = role_info["delegations"]
if not "roles" in delegations:
if "roles" not in delegations:
continue
parent_role_obj = _role_obj(role_name, repository)
delegations_info = role_info["delegations"]["roles"]
Expand Down
2 changes: 1 addition & 1 deletion taf/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _sort_roles(key_info, repository):
yubikey_roles.append((role_name, role_key_info))
if "delegations" in role_key_info:
delegations = role_key_info["delegations"]
if not "roles" in delegations:
if "roles" not in delegations:
continue
delegated_keystore_role, delegated_yubikey_roles = _sort_roles(
role_key_info["delegations"]["roles"], repository
Expand Down

0 comments on commit 6d076ec

Please sign in to comment.