Skip to content

Commit

Permalink
Merge pull request #8 from SaM-92/dev_b
Browse files Browse the repository at this point in the history
tidy up the code using Ruff
  • Loading branch information
SaM-92 authored Mar 2, 2024
2 parents 7ce9a99 + 45ee909 commit a38c863
Show file tree
Hide file tree
Showing 79 changed files with 120 additions and 527 deletions.
4 changes: 1 addition & 3 deletions .history/main_20240223010121.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,7 +10,6 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from dotenv import load_dotenv
Expand Down Expand Up @@ -66,7 +64,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
4 changes: 1 addition & 3 deletions .history/main_20240225012936.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,7 +10,6 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from dotenv import load_dotenv
Expand Down Expand Up @@ -66,7 +64,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
4 changes: 1 addition & 3 deletions .history/main_20240225012943.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,7 +10,6 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from dotenv import load_dotenv
Expand Down Expand Up @@ -66,7 +64,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
4 changes: 1 addition & 3 deletions .history/main_20240225013545.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,7 +10,6 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from dotenv import load_dotenv
Expand Down Expand Up @@ -66,7 +64,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
6 changes: 2 additions & 4 deletions .history/main_20240225013632.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,10 +10,9 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from subs.telegram_func import send_co2_intensity_plot, telegram_carbon_intensity
from subs.telegram_func import telegram_carbon_intensity
from dotenv import load_dotenv

# add vars to azure
Expand Down Expand Up @@ -67,7 +65,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
6 changes: 2 additions & 4 deletions .history/main_20240225013640.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,10 +10,9 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from subs.telegram_func import send_co2_intensity_plot, telegram_carbon_intensity
from subs.telegram_func import telegram_carbon_intensity
from dotenv import load_dotenv

# add vars to azure
Expand Down Expand Up @@ -67,7 +65,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
6 changes: 2 additions & 4 deletions .history/main_20240225013736.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,10 +10,9 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from subs.telegram_func import send_co2_intensity_plot, telegram_carbon_intensity
from subs.telegram_func import telegram_carbon_intensity
from dotenv import load_dotenv

# add vars to azure
Expand Down Expand Up @@ -67,7 +65,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
6 changes: 2 additions & 4 deletions .history/main_20240225014248.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,10 +10,9 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from subs.telegram_func import send_co2_intensity_plot, telegram_carbon_intensity
from subs.telegram_func import telegram_carbon_intensity
from dotenv import load_dotenv

# add vars to azure
Expand Down Expand Up @@ -67,7 +65,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
6 changes: 2 additions & 4 deletions .history/main_20240225014329.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,10 +10,9 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from subs.telegram_func import send_co2_intensity_plot, telegram_carbon_intensity
from subs.telegram_func import telegram_carbon_intensity
from dotenv import load_dotenv

# add vars to azure
Expand All @@ -40,7 +38,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
6 changes: 2 additions & 4 deletions .history/main_20240225021607.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,10 +10,9 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from subs.telegram_func import send_co2_intensity_plot, telegram_carbon_intensity
from subs.telegram_func import telegram_carbon_intensity
from dotenv import load_dotenv

# add vars to azure
Expand All @@ -40,7 +38,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
6 changes: 2 additions & 4 deletions .history/main_20240225021703.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,10 +10,9 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from subs.telegram_func import send_co2_intensity_plot, telegram_carbon_intensity
from subs.telegram_func import telegram_carbon_intensity
from dotenv import load_dotenv

# add vars to azure
Expand All @@ -40,7 +38,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
5 changes: 1 addition & 4 deletions .history/main_20240225021708.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,11 +10,9 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from subs.telegram_func import (
send_co2_intensity_plot,
telegram_carbon_intensity,
telegram_fuel_mix,
)
Expand Down Expand Up @@ -44,7 +41,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
5 changes: 1 addition & 4 deletions .history/main_20240225021709.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,11 +10,9 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from subs.telegram_func import (
send_co2_intensity_plot,
telegram_carbon_intensity,
telegram_fuel_mix,
)
Expand Down Expand Up @@ -44,7 +41,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
4 changes: 1 addition & 3 deletions .history/main_20240225021716.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,7 +10,6 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from subs.telegram_func import (
Expand Down Expand Up @@ -43,7 +41,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
4 changes: 1 addition & 3 deletions .history/main_20240225025949.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import os
import pandas as pd
from telegram import Update, ReplyKeyboardMarkup
from telegram.ext import (
Application,
Expand All @@ -11,7 +10,6 @@
ConversationHandler,
CallbackContext,
)
from elevenlabs import generate
from subs.energy_api import *
from subs.openai_script import *
from subs.telegram_func import (
Expand Down Expand Up @@ -43,7 +41,7 @@ async def energy_api_func(update: Update, context: CallbackContext):
user_first_name = update.message.from_user.first_name

await update.message.reply_text(
f"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
"""Thank you! \n 🚀 We are now processing your request and we will get back to you shortly. \n ⏱️ It takes up to 10 seconds.. """
)

user_selected_option = update.message.text
Expand Down
Loading

0 comments on commit a38c863

Please sign in to comment.