19 cur.execute("INSERT INTO decrip (user_id, ozon, wb, price) VALUES (%s, %s, %s, %s)", (user_id, ozon, wb, price))
20 conn.commit()
21
22"""23def dicount_on_WB(user_id, discount):
24 cur.execute('UPDATE about SET "dicount_on_WB" = %s WHERE user_id = %s',
25 (discount, user_id))
59 await message.answer('Введите % совпадения названия')
60
61
62""" 63@dp.message_handler(state='*', commands='discount')
64@dp.message_handler(Text(equals='discount', ignore_case=True), state='*')
65async def cmd_start(message: types.Message, state: FSMContext):
95 '\nЕсли запутались нажмите /cancel что бы начать сначала')
96
97
98""" 99персоналку не расчитать, вб на каждый товар считает ее по своему
100@dp.message_handler(lambda message: tests.for_check(message.text), state=Form.discount)
101async def message_match(message: Message, state: FSMContext):
The string statement has not been assigned to anything. This is pointless and should be removed if not necessary. In case this is supposed to describe what's happening in the code, it is recommended to use comments or docstrings instead.
'Define a function to add 2 numbers here.'
def add(a, b):
return a + b
Use Comments:
# Define a function to add 2 numbers here.
def add(a, b):
return a + b
or, use docstrings:
def add(a, b):
'''Function to add 2 numbers here.'''
return a + b