Skip to content

Commit 4b4484b

Browse files
committed
Code Quality
- 'pyrogram.types.User' imported but unused (F401) - 'psm.config' imported but unused (F401) - 're' imported but unused (F401) - Trailing whitespace
1 parent f0aade4 commit 4b4484b

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

psm/plugins/clear_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async def checkpass(client, message):
5050

5151

5252
@psm.on_message(filters.command('clear'))
53-
async def clear_dict(client, message):
53+
async def clear_dict(_, message):
5454
code_caches.pop(message.from_user.id, None)
5555
m = await message.reply('checking and clearing saved verification codes.')
5656
await asyncio.sleep(3)

psm/plugins/session_maker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from pyrogram import filters
2-
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, User, TermsOfService, ForceReply
2+
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, TermsOfService, ForceReply
33
from pyrogram import Client
44
from pyrogram.errors import FloodWait
55
from pyrogram import errors
66
import asyncio
77

8-
from psm import psm, config
8+
from psm import psm
99
from psm.plugins.dictionaries import code_caches, app_ids, app_hashs, passwords
1010

1111

@@ -17,7 +17,7 @@ async def client_session(message):
1717
)
1818

1919
@psm.on_message(filters.command('phone'))
20-
async def phone_number(client, message):
20+
async def phone_number(_, message):
2121
try:
2222
app = await client_session(message)
2323
except KeyError:
@@ -71,7 +71,7 @@ async def phone_number(client, message):
7171

7272

7373
@psm.on_message(filters.command('token'))
74-
async def bot_token(client, message):
74+
async def bot_token(_, message):
7575
try:
7676
app = await client_session(message)
7777
except KeyError:

psm/plugins/start.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import re
2-
31
from pyrogram import filters
42
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
53

@@ -29,6 +27,7 @@ async def help_button1(_, query):
2927
await query.message.edit(helptext2, reply_markup=InlineKeyboardMarkup(buttons))
3028
await query.answer()
3129

30+
3231
@psm.on_callback_query(dynamic_data_filter("help_3"))
3332
async def help_button2(_, query):
3433
buttons = [
@@ -37,6 +36,7 @@ async def help_button2(_, query):
3736
await query.message.edit(helptext3, reply_markup=InlineKeyboardMarkup(buttons))
3837
await query.answer()
3938

39+
4040
@psm.on_callback_query(dynamic_data_filter("tip_1"))
4141
async def tip_button1(_, query):
4242
buttons = [[

psm/plugins/vars.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,16 @@ async def check_vars(client, message):
99
text = f'**APP_ID**: `{app_ids[message.from_user.id]}`\n'
1010
except KeyError:
1111
text = '**APP_ID**: `None`\n'
12-
1312
try:
1413
text += f'**APP_HASH**: `{app_hashs[message.from_user.id]}`\n'
1514
except KeyError:
1615
text += '**APP_HASH**: `None`\n'
17-
1816
try:
1917
text += f'**PASSWORD**:`{passwords[message.from_user.id]}`\n'
2018
except KeyError:
2119
text += '**PASSWORD**: `None`\n'
22-
2320
try:
2421
text += f'**VALIDATE_CODE**:`{code_caches[message.from_user.id]}`'
2522
except KeyError:
2623
text += '**VALIDATE_CODE**: `None`'
27-
2824
await message.reply(text)

0 commit comments

Comments
 (0)