-
Notifications
You must be signed in to change notification settings - Fork 61
Unstable (Sourcery refactored) #13
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: unstable
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,19 +86,19 @@ async def remove_nsfw(client, message): | |
|
|
||
| async def is_harem_enabled(f, client, message): | ||
| if Config.ENABLE_WAIFU_FOR_ALL_CHATS: | ||
| return bool(True) | ||
| return bool(True) if await is_chat_in_db(int(message.chat.id)) else bool(False) | ||
| return True | ||
| return bool(await is_chat_in_db(int(message.chat.id))) | ||
|
Comment on lines
-89
to
+90
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
|
|
||
| async def harem_event(f, client, message): | ||
| if not message: | ||
| return bool(False) | ||
| return False | ||
| if not message.photo: | ||
| return bool(False) | ||
| return False | ||
| if not message.caption: | ||
| return bool(False) | ||
| return False | ||
| if "add" in message.caption.lower(): | ||
| return bool(True) | ||
| return bool(False) | ||
| return True | ||
| return False | ||
|
Comment on lines
-94
to
+101
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
|
|
||
| @run_in_exc | ||
| def get_data(img): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,5 +95,5 @@ def find_between(start_string, end_string, to_find): | |
| result = re.search(_to_, to_find) | ||
| if not result: | ||
| return None | ||
| return result.group(1) | ||
| return result[1] | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,8 +45,9 @@ async def test(client, message): | |
| end = datetime.now() | ||
| ms = (end - start).seconds | ||
| await Pablo.edit( | ||
| "Stored the zip to `{}` in {} seconds.".format(downloaded_file_name, ms) | ||
| f"Stored the zip to `{downloaded_file_name}` in {ms} seconds." | ||
| ) | ||
|
|
||
|
Comment on lines
-48
to
+50
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
| try: | ||
| with zipfile.ZipFile(downloaded_file_name, "r") as zip_ref: | ||
| zip_ref.extractall(extracted) | ||
|
|
||
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.
Lines
71-74refactored with the following changes:unwrap-iterable-construction)