Skip to content

Sourcery Starbot ⭐ refactored gruzewski/aws_visualiser#1

Open
SourceryAI wants to merge 1 commit intogruzewski:masterfrom
SourceryAI:master
Open

Sourcery Starbot ⭐ refactored gruzewski/aws_visualiser#1
SourceryAI wants to merge 1 commit intogruzewski:masterfrom
SourceryAI:master

Conversation

@SourceryAI
Copy link
Copy Markdown

Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨

Here's your pull request refactoring your most popular Python repo.

If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.

Review changes via command line

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

git fetch https://github.com/sourcery-ai-bot/aws_visualiser master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Comment on lines -35 to +46
table = (self.name, self.id, self.state, self.vpc_id, self.az, self.platform, self._get_groups(), self.public_dns, self.public_ip, self.type)
return table
return (
self.name,
self.id,
self.state,
self.vpc_id,
self.az,
self.platform,
self._get_groups(),
self.public_dns,
self.public_ip,
self.type,
)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function Instance.tuple_info refactored with the following changes:

Comment on lines -39 to +49
return [str("%s [%s]" % (sg.name, sg.id)) for sg in self.groups]
return [str(f"{sg.name} [{sg.id}]") for sg in self.groups]
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function Instance._get_groups refactored with the following changes:

Comment on lines -63 to +73
ec2_instances = dict()
ec2_instances = {}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function get_ec2_instances refactored with the following changes:

Comment on lines -84 to +94
print(key + ": No instances.")
print(f"{key}: No instances.")
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function print_ec2_instances refactored with the following changes:

Comment on lines -98 to +114
print("%s [%s]" % (sg.name, sg.id))
[print("-- from %s to %s granted for %s" % (rule.from_port, rule.to_port, ",".join([str(ip) for ip in rule.grants]))) for rule in sg.rules]
print(f"{sg.name} [{sg.id}]")
[
print(
f'-- from {rule.from_port} to {rule.to_port} granted for {",".join([str(ip) for ip in rule.grants])}'
)
for rule in sg.rules
]
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Lines 98-99 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