-
Notifications
You must be signed in to change notification settings - Fork 1
Sourcery refactored master branch #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| 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"]) |
There was a problem hiding this comment.
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:
- Inline variable that is immediately returned [×2] (
inline-immediately-returned-variable)
|
|
||
| for x in insts: | ||
| with open(x[0] + ".json", "w") as write_file: | ||
| with open(f"{x[0]}.json", "w") as write_file: |
There was a problem hiding this comment.
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:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation)
| f"Failed to Remove {policy_arn} from Profile {role.name} - skipping ", | ||
| e, | ||
| ) | ||
| pass |
There was a problem hiding this comment.
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:
- Remove redundant pass statement [×3] (
remove-redundant-pass)
| print( | ||
| f"SG {sec_group['GroupName']} {sec_group['GroupId']} does not have a group dependancy" | ||
| ) | ||
| pass |
There was a problem hiding this comment.
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:
- Remove redundant pass statement (
remove-redundant-pass)
| else: | ||
| pass |
There was a problem hiding this comment.
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:
- Remove redundant pass statement (
remove-redundant-pass)
| pass | ||
| except Exception as e: | ||
| print("AR: App Role problem - Still need to insert to Inst Prof", e) | ||
| pass |
There was a problem hiding this comment.
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:
- Remove redundant pass statement [×3] (
remove-redundant-pass)
|
|
||
| except self.iam_client.exceptions.EntityAlreadyExistsException: | ||
| print(f"PL: Policy {policy_name} Already exists -- skipping") | ||
| pass |
There was a problem hiding this comment.
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:
- Remove redundant pass statement (
remove-redundant-pass)
| 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 |
There was a problem hiding this comment.
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:
- Remove redundant pass statement (
remove-redundant-pass)
|
|
||
| except self.elbv2_client.exceptions.DuplicateTargetGroupNameException: | ||
| print("TG: Target Group Exists Already -- skipping") | ||
| pass |
There was a problem hiding this comment.
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:
- Remove redundant pass statement (
remove-redundant-pass)
| FirstTg_Group = random.choice([x for x in self.target_groups.keys()]) | ||
| FirstTg_Group = random.choice(list(self.target_groups.keys())) |
There was a problem hiding this comment.
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:
- Replace identity comprehension with call to collection constructor (
identity-comprehension)
Branch
masterrefactored 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
masterbranch, then run:Help us improve this pull request!