Skip to content

Conversation

@sourcery-ai
Copy link

@sourcery-ai sourcery-ai bot commented Apr 17, 2023

Branch main 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 main branch, then run:

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

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from Hardhack-maker April 17, 2023 06:51
for spell in spellbook:
if spell.is_awesome:
result.append(spell)
result = [spell for spell in spellbook if spell.is_awesome]
Copy link
Author

Choose a reason for hiding this comment

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

Function refactoring_example refactored with the following changes:

Comment on lines -30 to +29
if is_powerful(magic):
result = 'Magic'
else:
if not is_powerful(magic):
print("Not powerful.")
result = 'Magic'
result = 'Magic'
Copy link
Author

Choose a reason for hiding this comment

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

Function magical_hoist refactored with the following changes:

Comment on lines -75 to +70
powerful_magic = []
for magic in magicks:
if not is_powerful(magic):
continue
powerful_magic.append(magic)
return powerful_magic
return [magic for magic in magicks if is_powerful(magic)]
Copy link
Author

Choose a reason for hiding this comment

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

Function find_more refactored with the following changes:

Comment on lines -84 to +74
if magic == 'Sourcery':
return True
elif magic == 'More Sourcery':
return True
else:
return False
return magic in ['Sourcery', 'More Sourcery']
Copy link
Author

Choose a reason for hiding this comment

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

Function is_powerful refactored with the following changes:

Comment on lines -93 to +79
for i in range(len(spells)):
print(spells[i])
for spell in spells:
print(spell)
Copy link
Author

Choose a reason for hiding this comment

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

Function print_all 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