Skip to content

Commit

Permalink
Some warning fixes suggested by CodeQL (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
deep-volue committed Nov 6, 2023
1 parent b671830 commit 7c36966
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion examples/Listening_for_changes/renewables_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import wapi
import pandas as pd
import matplotlib.pyplot as plt
import time
import os

Expand Down
2 changes: 1 addition & 1 deletion examples/general_examples/gen_pv_actuals_vs_forecast.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
This simple example compares yesterdays Photovoltaic Forecast based on the EC00
This simple example compares yesterday's Photovoltaic Forecast based on the EC00
weather forecast and the GFS00 weather forecasts with the Actual PV production.
The comparison can be performed for any region
"""
Expand Down
1 change: 0 additions & 1 deletion examples/general_examples/gen_save_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import wapi
import pandas as pd
import matplotlib.pyplot as plt
import os

############################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"""

import wapi
import pandas as pd
import matplotlib.pyplot as plt

############################################
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pytz
pandas >= 0.21
future >= 0.16
configparser >= 3.5; python_version < "3"
matplotlib
1 change: 0 additions & 1 deletion wapi/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Authentication support
#

import imp
import json
import time
import threading
Expand Down
4 changes: 2 additions & 2 deletions wapi/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def fetch_events(self):
if sse_event.retry is not None:
try:
self.retry = int(sse_event.retry)
except:
except Exception:

Check notice

Code scanning / CodeQL

Empty except Note

'except' clause does nothing but pass and there is no explanatory comment.
pass
if self.do_shutdown:
break
Expand Down Expand Up @@ -107,7 +107,7 @@ def __init__(self, sse_event):
self._raw_event = sse_event
try:
self.json_data = json.loads(sse_event.data)
except:
except Exception:
self.json_data = None


Expand Down

0 comments on commit 7c36966

Please sign in to comment.