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!26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issues-17"
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 #17
fix #25
@ -11,6 +13,19 @@ from src.weather.weathercoding import ()class CityData(NamedTuple):Этот namedtuple по факту состоит из других namedtuple (weatherdata и geodata), не добавляя ничего нового, мб лучше использовать их напрямую?
@ -10,0 +18,4 @@api_key: strclass Timeout(NamedTuple):А зачем Namedtuple из одного поля?
@ -87,0 +82,4 @@f"Humidity: {data['hum']} %\n"f"Wind speed: {data['windspeed']} m/s\n"f"Wind direction: {data['winddir']}\n"f"By {data['provider']}"одно из преимуществ namedtuple в том что не надо обращаться к атрибутам через квадратные скобки, а можно просто писать
data.provider@ -32,0 +35,4 @@assert json_parser.get_weather_config() == WeatherConfig("openweather","weather api key",)Это можно убрать если timeout будет просто int
@ -24,2 +30,3 @@@freeze_time("2023-01-01 00:00:00.000000+00:00")def test_openweather_parsing(mock_openweather_get):provider = OpenWeatherWeatherProvider({"api_key": "beepboop"}, COORDS)provider = OpenWeatherWeatherProvider(WeatherConfig, Coords)Почему работает с Coords? Это же класс