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

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

Comment on lines -36 to +40
headers.update(kwargs.get("headers") or {})
headers |= (kwargs.get("headers") or {})

data = clear_dict(kwargs.get("data"))
if data:
prompt = data.get("prompt", "").lower().split(" ")
if prompt:
if prompt := data.get("prompt", "").lower().split(" "):
Copy link
Author

Choose a reason for hiding this comment

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

Function AsyncImagine._request refactored with the following changes:

Comment on lines -79 to +78
href = item.value[2 if isinstance(
item, Model) or isinstance(item, Style) else 1]
href = item.value[2 if isinstance(item, (Model, Style)) else 1]
Copy link
Author

Choose a reason for hiding this comment

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

Function AsyncImagine.thumb refactored with the following changes:

Comment on lines -116 to +114
if asbase64 == True:
if asbase64:
Copy link
Author

Choose a reason for hiding this comment

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

Function AsyncImagine.variate refactored with the following changes:

Comment on lines -155 to +153
if asbase64 == True:
if asbase64:
Copy link
Author

Choose a reason for hiding this comment

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

Function AsyncImagine.sdprem refactored with the following changes:

Comment on lines -173 to +171
if asbase64 == True:
if asbase64:
Copy link
Author

Choose a reason for hiding this comment

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

Function AsyncImagine.upscale refactored with the following changes:

Comment on lines -151 to +149
if asbase64 == True:
if asbase64:
Copy link
Author

Choose a reason for hiding this comment

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

Function Imagine.sdprem refactored with the following changes:

Comment on lines -169 to +167
if asbase64 == True:
if asbase64:
Copy link
Author

Choose a reason for hiding this comment

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

Function Imagine.upscale refactored with the following changes:

Comment on lines -238 to +236
if asbase64 == True:
if asbase64:
Copy link
Author

Choose a reason for hiding this comment

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

Function Imagine.sdimg refactored with the following changes:

Comment on lines -275 to +273
if asbase64 == True:
if asbase64:
Copy link
Author

Choose a reason for hiding this comment

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

Function Imagine.controlnet refactored with the following changes:

Comment on lines -293 to +291
if asbase64 == True:
if asbase64:
Copy link
Author

Choose a reason for hiding this comment

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

Function Imagine.codeformer 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