mirror of
https://github.com/EDeev/npr_meteobot.git
synced 2026-10-07 20:49:33 +03:00
Мелкие исправления по ruff: дублирующееся имя обработчика /weather, неиспользуемые переменные
This commit is contained in:
parent
f223570bab
commit
28a5170be0
2 changed files with 3 additions and 3 deletions
2
bot.py
2
bot.py
|
|
@ -157,7 +157,7 @@ async def act(message: types.Message):
|
||||||
|
|
||||||
|
|
||||||
@dp.message_handler(commands=['weather'])
|
@dp.message_handler(commands=['weather'])
|
||||||
async def storm(message: types.Message):
|
async def weather_command(message: types.Message):
|
||||||
text = message.text.split()
|
text = message.text.split()
|
||||||
try:
|
try:
|
||||||
day = int(text[1])
|
day = int(text[1])
|
||||||
|
|
|
||||||
4
info.py
4
info.py
|
|
@ -22,7 +22,7 @@ def act():
|
||||||
acta[acta.index(lst)] = [config.CITY[lst[0]], int(lst[1].split("-")[1].split()[0])]
|
acta[acta.index(lst)] = [config.CITY[lst[0]], int(lst[1].split("-")[1].split()[0])]
|
||||||
|
|
||||||
return sorted(acta), count
|
return sorted(acta), count
|
||||||
except Exception as e:
|
except Exception:
|
||||||
return [], ""
|
return [], ""
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -57,7 +57,7 @@ def weather(moment):
|
||||||
dire = soup.find_all("div", class_="direction")
|
dire = soup.find_all("div", class_="direction")
|
||||||
prec = soup.find_all("div", class_="item-unit")
|
prec = soup.find_all("div", class_="item-unit")
|
||||||
|
|
||||||
k, s, weather = 0, 0, {}
|
weather = {}
|
||||||
|
|
||||||
for i in range(8):
|
for i in range(8):
|
||||||
par = wind[i].get_text().split()[0].split('-')
|
par = wind[i].get_text().split()[0].split('-')
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue