Skip to content

Commit

Permalink
refactor: remove commented out code (#33)
Browse files Browse the repository at this point in the history
It is recommended to remove any commented code in your codebase.

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
deepsource-autofix[bot] authored Jan 9, 2024
1 parent d851d5a commit 3d8f367
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions src/plugins/ncm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from typing import Tuple, Any, Union

from nonebot import on_regex, on_command, on_message
Expand Down Expand Up @@ -89,7 +87,6 @@ async def music_set_rule(event: Union[GroupMessageEvent, PrivateMessageEvent]) -


async def music_reply_rule(event: Union[GroupMessageEvent, PrivateMessageEvent]):
# logger.info(event.get_plaintext())
return event.reply and event.get_plaintext().strip() == "下载"


Expand Down Expand Up @@ -125,7 +122,6 @@ async def receive_song(
MessageSegment.music(type_="163", id_=_id))
)
nncm.get_song(message_id=message_id["message_id"], nid=_id)
# try:

# except ActionFailed as e:
# logger.error(e.info)
Expand Down
9 changes: 0 additions & 9 deletions src/plugins/ncm/data_source.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import asyncio
import re
import time
Expand Down Expand Up @@ -273,13 +271,6 @@ async def upload_private_file(user_id: int, file: str, name: str):
await bot.send_private_msg(user_id=user_id, message=Message(MessageSegment.text(
"[ERROR] 文件上传失败\r\n[原因] 上传超时(一般来说还在传,建议等待五分钟)")))

# @run_sync
# def get_zip(self, lid: int, filenames: list):
# zip_file_new = f'{lid}.zip'
# with zipfile.ZipFile(str(Path.cwd().joinpath("music").joinpath(zip_file_new)), 'w', zipfile.ZIP_DEFLATED) as z:
# for f in filenames:
# z.write(str(f), f.name)
# return zip_file_new
async def upload(self, data: dict, fr: str, event: Union[GroupMessageEvent, PrivateMessageEvent]):
if data["code"] == 404:
logger.error("未从网易云读取到下载地址")
Expand Down

0 comments on commit 3d8f367

Please sign in to comment.