Skip to content

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^

user_id = username.split('=')[1]
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

webbrowser.open_new_tab(new_url)
_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