Пишу код магазина на telebot и тут уже не первый раз сталкиваюсь с ошибками
Expected indented blockPylance
Inconsistent use of tabs and spaces in indentationPylance
Unindent amount does not match previous indentPylance
сам код(функции)
@client.callback_query_handler(lambda call: call.data == 'buytovaryes' or call.data == 'buytovarno')
def buy_callback(call):
if call.data == 'buytovaryes':
for info in sql.execute(f"SELECT * FROM users WHERE id = {call.from_user.id}"):
for infoshop in sql.execute(f"SELECT * FROM shop WHERE id = {tovarid}"):
cashtovar = int(info[2] - infoshop[2])
boughttovar = int(info[4] + 1)
whobuytovarinttostr = str(info[0])
whobuytovar = str(infoshop[4] + whobuytovarinttostr + ',')
sql.execute(f"SELECT * FROM users WHERE id = {call.from_user.id}")
client.delete_message(call.message.chat.id, call.message.message_id-0)
client.send_message(call.message.chat.id, f"✅ | Вы успешно купили товар\n\nНазвание товара: {infoshop[1]}\nЦена: {infoshop[2]}\n\nТовар: {infoshop[3]}\n\nСпасибо за покупку!")
for admin in sql.execute(f"SELECT * FROM users WHERE id = {call.from_user.id}"):
client.send_message(6037918044, f"➖➖➖➖➖➖➖➖➖➖➖➖\nНовый заказ!\nТовар: {infoshop[1]}\nЦена: {infoshop[2]}\n\nТовар: {infoshop[3]}\nЗакащик:\n ID:{call.message.chat.id}\n Имя:{call.from_user.first_name}\n➖➖➖➖➖➖➖➖➖➖➖➖")
sql.execute(f"UPDATE users SET cash = {cashtovar} WHERE id = {call.from_user.id}")
sql.execute(f"UPDATE users SET bought = {boughttovar} WHERE id = {call.from_user.id}")
sql.execute(f"SELECT * FROM shop WHERE id = {tovarid}")
sql.execute(f"UPDATE shop SET whobuy = '{whobuytovar}' WHERE id = {tovarid}")
db.commit()
elif call.data == 'buytovarno':
client.delete_message(call.message.chat.id, call.message.message_id-0)
client.send_message(call.message.chat.id, f"❌ | Вы отменили покупку товара!")
client.answer_callback_query(callback_query_id=call.id)
и в строчках
for admin in sql.execute(f"SELECT * FROM users WHERE id = {call.from_user.id}"):
client.send_message(6037918044, f"➖➖➖➖➖➖➖➖➖➖➖➖\nНовый заказ!\nТовар: {infoshop[1]}\nЦена: {infoshop[2]}\n\nТовар: {infoshop[3]}\nЗакащик:\n ID:{call.message.chat.id}\n Имя:
Возникает эта ошибка