-
Notifications
You must be signed in to change notification settings - Fork 16
Sourcery Starbot ⭐ refactored ItsCEED/Imaginepy #31
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
base: main
Are you sure you want to change the base?
Conversation
| 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(" "): |
There was a problem hiding this comment.
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:
- Merge dictionary updates via the union operator (
dict-assign-update-to-union) - Use named expression to simplify assignment and conditional (
use-named-expression)
| 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] |
There was a problem hiding this comment.
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:
- Merge isinstance calls (
merge-isinstance)
| if asbase64 == True: | ||
| if asbase64: |
There was a problem hiding this comment.
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:
- Simplify comparison to boolean (
simplify-boolean-comparison)
| if asbase64 == True: | ||
| if asbase64: |
There was a problem hiding this comment.
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:
- Simplify comparison to boolean (
simplify-boolean-comparison)
| if asbase64 == True: | ||
| if asbase64: |
There was a problem hiding this comment.
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:
- Simplify comparison to boolean (
simplify-boolean-comparison)
| if asbase64 == True: | ||
| if asbase64: |
There was a problem hiding this comment.
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:
- Simplify comparison to boolean (
simplify-boolean-comparison)
| if asbase64 == True: | ||
| if asbase64: |
There was a problem hiding this comment.
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:
- Simplify comparison to boolean (
simplify-boolean-comparison)
| if asbase64 == True: | ||
| if asbase64: |
There was a problem hiding this comment.
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:
- Simplify comparison to boolean (
simplify-boolean-comparison)
| if asbase64 == True: | ||
| if asbase64: |
There was a problem hiding this comment.
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:
- Simplify comparison to boolean (
simplify-boolean-comparison)
| if asbase64 == True: | ||
| if asbase64: |
There was a problem hiding this comment.
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:
- Simplify comparison to boolean (
simplify-boolean-comparison)
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
mainbranch, then run: