File tree Expand file tree Collapse file tree 2 files changed +18
-8
lines changed
Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 1- loguru
2- hyprpy
3- pywayland
1+ loguru == 0.7.3
2+ pulsectl == 24.12.0
3+ pywayland == 0.4.18
4+ requests == 2.32.3
Original file line number Diff line number Diff line change 44import sys
55import json
66from datetime import datetime
7- import requests
7+
8+
9+ import pyutils .pip_env as pip_env
10+
11+ sys .path .insert (0 , os .path .dirname (os .path .abspath (__file__ )))
12+ pip_env .v_import (
13+ "requests"
14+ ) # fetches the module by name // does `pip install --update requests` under the hood
15+ import requests # noqa: E402
16+
817
918### Constants ###
1019WEATHER_CODES = {
5160
5261### Functions ###
5362def load_env_file (filepath ):
54- with open (filepath , encoding = ' utf-8' ) as f :
63+ with open (filepath , encoding = " utf-8" ) as f :
5564 for line in f :
5665 if line .strip () and not line .startswith ("#" ):
5766 if line .startswith ("export " ):
@@ -204,9 +213,9 @@ def format_chances(hour):
204213 ) # Number of days to show the forecast for (default: 3)
205214except ValueError :
206215 FORECAST_DAYS = 3
207- get_location = os .getenv (
208- "WEATHER_LOCATION " , ""
209- ). replace ( " " , "_" ) # Name of the location to get the weather from (default: '')
216+ get_location = os .getenv ("WEATHER_LOCATION" , "" ). replace (
217+ " " , "_ "
218+ ) # Name of the location to get the weather from (default: '')
210219# Parse the location to wttr.in format (snake_case)
211220
212221# Check if the variables are set correctly
You can’t perform that action at this time.
0 commit comments