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

Update dependency aiohttp to v3.9.2 [SECURITY] #98

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion NekoRobot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""


import logging
import os
import sys
Expand Down
20 changes: 12 additions & 8 deletions NekoRobot/modules/cust_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,19 +325,23 @@ def reply_filter(update, context):
if message.from_user.last_name
else [escape(message.from_user.first_name)]
),
username=f"@{escape(message.from_user.username)}"
if message.from_user.username
else mention_html(
message.from_user.id,
message.from_user.first_name,
username=(
f"@{escape(message.from_user.username)}"
if message.from_user.username
else mention_html(
message.from_user.id,
message.from_user.first_name,
)
),
mention=mention_html(
message.from_user.id,
message.from_user.first_name,
),
chatname=escape(message.chat.title)
if message.chat.type != "private"
else escape(message.from_user.first_name),
chatname=(
escape(message.chat.title)
if message.chat.type != "private"
else escape(message.from_user.first_name)
),
id=message.from_user.id,
)

Expand Down
1 change: 1 addition & 0 deletions NekoRobot/modules/helper_funcs/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

from telegram import Message
from telegram.ext import MessageFilter

Expand Down
8 changes: 5 additions & 3 deletions NekoRobot/modules/helper_funcs/miku_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ def build_keyboard(buttons):

def revert_buttons(buttons):
return "".join(
"\n[{}](buttonurl://{}:same)".format(btn.name, btn.url)
if btn.same_line
else "\n[{}](buttonurl://{})".format(btn.name, btn.url)
(
"\n[{}](buttonurl://{}:same)".format(btn.name, btn.url)
if btn.same_line
else "\n[{}](buttonurl://{})".format(btn.name, btn.url)
)
for btn in buttons
)

Expand Down
8 changes: 5 additions & 3 deletions NekoRobot/modules/helper_funcs/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ def build_keyboard(buttons):

def revert_buttons(buttons):
return "".join(
"\n[{}](buttonurl://{}:same)".format(btn.name, btn.url)
if btn.same_line
else "\n[{}](buttonurl://{})".format(btn.name, btn.url)
(
"\n[{}](buttonurl://{}:same)".format(btn.name, btn.url)
if btn.same_line
else "\n[{}](buttonurl://{})".format(btn.name, btn.url)
)
for btn in buttons
)

Expand Down
1 change: 0 additions & 1 deletion NekoRobot/modules/image_reverse_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""


import os
import re
import urllib
Expand Down
1 change: 0 additions & 1 deletion NekoRobot/modules/nightmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""


from apscheduler.schedulers.asyncio import AsyncIOScheduler
from telethon import *
from telethon import functions
Expand Down
10 changes: 6 additions & 4 deletions NekoRobot/modules/notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@ def get(update, context, notename, show_none=True, no_format=False):
else [message.from_user.first_name]
)
),
username=f"@{message.from_user.username}"
if message.from_user.username
else mention_markdown(
message.from_user.id, message.from_user.first_name
username=(
f"@{message.from_user.username}"
if message.from_user.username
else mention_markdown(
message.from_user.id, message.from_user.first_name
)
),
mention=mention_markdown(
message.from_user.id, message.from_user.first_name
Expand Down
4 changes: 3 additions & 1 deletion NekoRobot/modules/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ async def awake(event):

BUTTON = [
[
Button.url("📢 Repository", "https://github.com/Awesome-Prince/NekoRobot-3"),
Button.url(
"📢 Repository", "https://github.com/Awesome-Prince/NekoRobot-3"
),
Button.url("💻 Collaborators", "https://telegra.ph/Neko-X-05-23"),
]
]
Expand Down
1 change: 0 additions & 1 deletion NekoRobot/modules/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""


from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ParseMode, Update
from telegram.error import BadRequest
from telegram.ext import CallbackContext, CommandHandler, Filters
Expand Down
1 change: 0 additions & 1 deletion NekoRobot/modules/send.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""


from NekoRobot import NEKO_PTB
from NekoRobot.modules.disable import DisableAbleCommandHandler
from NekoRobot.modules.helper_funcs.alternate import send_message
Expand Down
1 change: 0 additions & 1 deletion NekoRobot/modules/sql/locks_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""


# New chat added -> setup permissions
import threading

Expand Down
16 changes: 10 additions & 6 deletions NekoRobot/services/types/InlineQueryResult.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,11 @@ async def write(self, client: "pyrogram.Client"):
await self.input_message_content.write(client, self.reply_markup)
if self.input_message_content
else raw.types.InputBotInlineMessageMediaAuto(
reply_markup=await self.reply_markup.write(client)
if self.reply_markup
else None,
reply_markup=(
await self.reply_markup.write(client)
if self.reply_markup
else None
),
message=message,
entities=entities,
)
Expand Down Expand Up @@ -215,9 +217,11 @@ async def write(self, client: "pyrogram.Client"):
await self.input_message_content.write(client, self.reply_markup)
if self.input_message_content
else raw.types.InputBotInlineMessageMediaAuto(
reply_markup=await self.reply_markup.write(client)
if self.reply_markup
else None,
reply_markup=(
await self.reply_markup.write(client)
if self.reply_markup
else None
),
message=message,
entities=entities,
)
Expand Down
1 change: 0 additions & 1 deletion NekoRobot/utils/pastebin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""


import socket
from asyncio import get_running_loop
from functools import partial
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pySmartDL
validators
asyncio
nltk
aiohttp==3.8.3
aiohttp==3.9.2
pykeyboard==0.1.2
Pillow==9.3.0
CurrencyConverter
Expand Down