New webka #37
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
bug
enhancement
question
techdebt
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DD/Pogodnik!37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issues-36"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fix #36
Прошу посмотреть пока я фикшу тесты. Кст надо в CI в mypy тест добавить аргумент app.py в строке.
я устал
@ -35,0 +76,4 @@config_weather, crd)weather_data = net_weather_provider.weather_data( # of the net providernet_weather_provider.request()может сразу вызывать self.request() в weather_data()?
@ -44,0 +93,4 @@geo_config, weather_config, timeout = get_config(file_config)geo_provider, city_list = get_city_list(geo_config)print("\n".join([f"{elem}. {city_list[elem]}" for elem in city_list]))num = int(input("Please write number your city: "))"Please write your city number:"
Это ломает возможность запустить погодник в неинтерактивном режиме (по предыдущим тз), когда пользователь просто запускает его из консоли без необходимости что-то вводить
@ -2,2 +3,3 @@from flask import Flask, render_templatefrom flask import Flask, redirect, render_template, request, url_forfrom wtforms import ( # type: ignore # https://github.com/wtforms/wtforms/issues/618А зачем нам втформс если валидация в них не используется и можно обойтись фласковыми формами?
@ -11,0 +22,4 @@with open(file_config) as f:config_data = json.load(f)config_data["city_name"] = city_namefile_config = Path("net_config.json")Это что, это зачем? У нас вроде как все через один конфиг должно настраиваться + это ломает многопользовательский доступ
@ -29,3 +30,1 @@self.config = dict() if len(data) == 0 else data[0]else:self.config = dataself.list_city = get(url, params=payload).json()city_listтогда уж@ -30,2 +30,2 @@else:self.config = dataself.list_city = get(url, params=payload).json()if len(self.list_city) == 0:if not self.city_list:
@ -32,0 +30,4 @@self.list_city = get(url, params=payload).json()if len(self.list_city) == 0:raise ProviderNoDataError("This city is not found. Please, check city name")if (isinstance(self.list_city, dict)) and (self.list_city["cod"] is not None):а если не isinstance(self.list_city, dict))?
match get(...):
case []:
raise ...
case {'cod': value, **_}:
raise ...
case valid_list:
self.city_list = valid_list
Дык добавь))
дык добавил