Skip to content

Commit

Permalink
Format using black
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth committed Aug 16, 2024
1 parent a9c186a commit 9f9ec7f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions adafruit_io/adafruit_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,9 @@ def get_remaining_throttle_limit(self):
path = self._compose_path("throttle")
user_rates = self._get(path)
if user_rates is None:
raise Exception("Could not get user info, get_user_rate_info returned None.")
raise Exception(

Check failure on line 899 in adafruit_io/adafruit_io.py

View workflow job for this annotation

GitHub Actions / test

Raising too general exception: Exception

Check failure on line 899 in adafruit_io/adafruit_io.py

View workflow job for this annotation

GitHub Actions / test

Raising too general exception: Exception
"Could not get user info, get_user_rate_info returned None."
)
return user_rates["data_rate_limit"] - user_rates["active_data_rate"]

def get_throttle_limit(self):
Expand All @@ -908,7 +910,9 @@ def get_throttle_limit(self):
path = self._compose_path("throttle")
user_rates = self._get(path)
if user_rates is None:
raise Exception("Could not get user info, get_user_rate_info returned None.")
raise Exception(

Check failure on line 913 in adafruit_io/adafruit_io.py

View workflow job for this annotation

GitHub Actions / test

Raising too general exception: Exception

Check failure on line 913 in adafruit_io/adafruit_io.py

View workflow job for this annotation

GitHub Actions / test

Raising too general exception: Exception
"Could not get user info, get_user_rate_info returned None."
)
return user_rates["data_rate_limit"]

def get_current_usage(self):
Expand All @@ -920,7 +924,9 @@ def get_current_usage(self):
path = self._compose_path("throttle")
user_rates = self._get(path)
if user_rates is None:
raise Exception("Could not get user info, get_user_rate_info returned None.")
raise Exception(

Check failure on line 927 in adafruit_io/adafruit_io.py

View workflow job for this annotation

GitHub Actions / test

Raising too general exception: Exception

Check failure on line 927 in adafruit_io/adafruit_io.py

View workflow job for this annotation

GitHub Actions / test

Raising too general exception: Exception
"Could not get user info, get_user_rate_info returned None."
)
return user_rates["active_data_rate"]

def receive_time(self, timezone: str = None):
Expand Down

0 comments on commit 9f9ec7f

Please sign in to comment.