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

Updated & Optimized #70

Open
wants to merge 4 commits into
base: devel
Choose a base branch
from
Open

Conversation

MrShadowDev
Copy link

No description provided.

@auto-assign auto-assign bot requested a review from edoardottt October 23, 2023 07:35
@edoardottt edoardottt changed the base branch from main to devel October 23, 2023 07:37
@@ -46,9 +46,6 @@ def error_handler(e):
logger.info("Sleeping for five minutes.")
time.sleep(5 * 60)

# for other types of issues with specific behaviour
Copy link
Owner

Choose a reason for hiding this comment

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

is there a specific reason to delete this comment?

@@ -56,7 +56,7 @@ def tweet_banner(message):
This is a standard tweet to spread info about the bot.
"""
tweet = str(datetime.datetime.now()) + "\n"
tweet += "This is a bot at the service of @" + globals.user + ".\n"
tweet += f"This is a bot at the service of @{globals.user}" + ".\n"
Copy link
Owner

Choose a reason for hiding this comment

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

Here the final ".\n" is not included in the string

_ = open(directory + "/" + filename, "w+")
if not os.path.exists(f"{directory}/{filename}"):
_ = open(f"{directory}/{filename}", "w+")
elif answer := ask_confirmation():
Copy link
Owner

Choose a reason for hiding this comment

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

What's the purpose of assigning answer here?

if thread.getName() == "bot" and not thread.is_alive():
return "error", 500
return "ok"
return next(
Copy link
Owner

Choose a reason for hiding this comment

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

Sorry, I'm not understanding this return statement...

for i in range(0, len(values)):
result += values[i][2]
return str(result)
result = sum(values[i][2] for i in range(0, len(values)))
Copy link
Owner

Choose a reason for hiding this comment

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

why not a direct return ...?

server.py Show resolved Hide resolved
else:
result = values[0][3]
return str(result)
result = values[0][3]
Copy link
Owner

Choose a reason for hiding this comment

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

why not a direct return ...?

server.py Show resolved Hide resolved
server.py Show resolved Hide resolved
@@ -39,11 +39,11 @@ def check_stat(username):
logger = logging.getLogger("matplotlib")
logger.setLevel(logging.CRITICAL)
logger = logging.getLogger("__main__")
dates = [] # contains all the dates stored in the database
Copy link
Owner

Choose a reason for hiding this comment

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

What's the purpose of deleting the comment?

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.

2 participants