Skip to content

Commit

Permalink
fixed quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
Naz-iv committed Dec 8, 2023
1 parent 56f5e8e commit 3c73f81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def get_weather(
current_time = (datetime.utcnow() + timedelta(
seconds=data.get("timezone", 0)
)).strftime("%Y-%m-%d %H:%M")
country = pycountry.countries.get(alpha_2=data['sys']['country'])
country = pycountry.countries.get(alpha_2=data["sys"]["country"])
print(f"{data['name']}/{country.name} {current_time} "
f"Weather: {round(data['main']['temp'], 1)} Celsius, "
f"{'/'.join(weather.get('main', '') for weather in data['weather'])}")
f"{'/'.join(w.get('main', '') for w in data['weather'])}")
else:
print("Failed to retrieve weather data. "
f"Status Code: {response.status_code}")
Expand Down

0 comments on commit 3c73f81

Please sign in to comment.