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 refactored master branch #4

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

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Oct 31, 2023

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from jigarvarma2k20 October 31, 2023 17:50
Comment on lines -3 to +5
class Config():


class Config:
Copy link
Author

Choose a reason for hiding this comment

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

Lines 3-27 refactored with the following changes:

update_channel = UPDATES_CHANNEL
if update_channel:
if update_channel := UPDATES_CHANNEL:
Copy link
Author

Choose a reason for hiding this comment

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

Function _start refactored with the following changes:

Comment on lines -99 to +98
update_channel = UPDATES_CHANNEL
if update_channel:
if update_channel := UPDATES_CHANNEL:
Copy link
Author

Choose a reason for hiding this comment

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

Function _help refactored with the following changes:

Comment on lines -152 to -167
if(pos==1):
button = [
[InlineKeyboardButton(text = '-->', callback_data = "help+2")]
]
elif(pos==len(tr.HELP_MSG)-1):
button = [
[InlineKeyboardButton(text = '<--', callback_data = f"help+{pos-1}")]
if (pos==1):
return [[InlineKeyboardButton(text='-->', callback_data="help+2")]]
elif (pos==len(tr.HELP_MSG)-1):
return [
[InlineKeyboardButton(text='<--', callback_data=f"help+{pos-1}")]
]
else:
button = [
return [
[
InlineKeyboardButton(text = '<--', callback_data = f"help+{pos-1}"),
InlineKeyboardButton(text = '-->', callback_data = f"help+{pos+1}")
InlineKeyboardButton(
text='<--', callback_data=f"help+{pos-1}"
),
InlineKeyboardButton(
text='-->', callback_data=f"help+{pos+1}"
),
],
]
return button
Copy link
Author

Choose a reason for hiding this comment

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

Function map refactored with the following changes:

Comment on lines 20 to 21
print(str(e)) No newline at end of file
print(e)
Copy link
Author

Choose a reason for hiding this comment

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

Lines 21-21 refactored with the following changes:

rem = SESSION.query(forceSubscribe).get(chat_id)
if rem:
if rem := SESSION.query(forceSubscribe).get(chat_id):
Copy link
Author

Choose a reason for hiding this comment

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

Function disapprove 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.

0 participants