Skip to content
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

Sourcery Starbot ⭐ refactored tusharmakkar08/Imagyy #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SourceryAI
Copy link

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/Imagyy master
git merge --ff-only FETCH_HEAD
git reset HEAD^

@@ -66,11 +66,9 @@ def command_line_runner():
facebook_image_search("", user_id, directory_to_download=args['directory'])
else:
facebook_image_search(username, directory_to_download=args['directory'])
Copy link
Author

Choose a reason for hiding this comment

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

Function command_line_runner refactored with the following changes:

  • Remove redundant conditional

@@ -112,10 +112,7 @@ def facebook_image_search(username, user_id=None, directory_to_download=None):
_open_image_page(user_id)
_open_profile_pic(user_id)
if not directory_to_download:
Copy link
Author

Choose a reason for hiding this comment

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

Function facebook_image_search refactored with the following changes:

  • Swap positions of nested conditionals
  • Hoist repeated code outside conditional statement
  • Replace if statement with if expression

Copy link
Owner

@tusharmakkar08 tusharmakkar08 left a comment

Choose a reason for hiding this comment

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

Not great

@Hellebore
Copy link

Hi Tushar - would love to know what in particular you're not happy with. GitHub reviews are new for us and we're keen to improve.

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.

3 participants