Skip to content

Conversation

@sourcery-ai
Copy link

@sourcery-ai sourcery-ai bot commented May 4, 2023

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from jouellnyc May 4, 2023 22:41
Comment on lines -46 to +48
secret = get_secret_value_response["SecretString"]
return secret
return get_secret_value_response["SecretString"]
else:
decoded_binary_secret = base64.b64decode(
get_secret_value_response["SecretBinary"]
)
return decoded_binary_secret
return base64.b64decode(get_secret_value_response["SecretBinary"])
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function get_secret refactored with the following changes:


for x in insts:
with open(x[0] + ".json", "w") as write_file:
with open(f"{x[0]}.json", "w") as write_file:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 17-17 refactored with the following changes:

f"Failed to Remove {policy_arn} from Profile {role.name} - skipping ",
e,
)
pass
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function delete_items refactored with the following changes:

print(
f"SG {sec_group['GroupName']} {sec_group['GroupId']} does not have a group dependancy"
)
pass
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function vpc_delete refactored with the following changes:

Comment on lines -28 to -29
else:
pass
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function main refactored with the following changes:

Comment on lines -292 to -295
pass
except Exception as e:
print("AR: App Role problem - Still need to insert to Inst Prof", e)
pass
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function BUILD.my_create_app_role refactored with the following changes:


except self.iam_client.exceptions.EntityAlreadyExistsException:
print(f"PL: Policy {policy_name} Already exists -- skipping")
pass
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function BUILD.my_create_policy refactored with the following changes:

self.logs_client.create_log_group(logGroupName=log_group_name)
except self.logs_client.exceptions.ResourceAlreadyExistsException:
print(f"LG: Log Group {log_group_name} Already Exists -- skipping")
pass
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function BUILD.my_create_log_groups refactored with the following changes:


except self.elbv2_client.exceptions.DuplicateTargetGroupNameException:
print("TG: Target Group Exists Already -- skipping")
pass
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function BUILD.my_create_t_a_p_group refactored with the following changes:

Comment on lines -459 to +449
FirstTg_Group = random.choice([x for x in self.target_groups.keys()])
FirstTg_Group = random.choice(list(self.target_groups.keys()))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function BUILD.my_create_load_balancer refactored with the following changes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant