Skip to content

Commit

Permalink
[coddingtonbear#147] Minor style fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
coddingtonbear committed Jan 16, 2023
1 parent 934960e commit 223995b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions myfitnesspal/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,10 @@ def get_report(
"""
Returns report data of a given name and category between two dates.
"""
if (datetime.date.today()-lower_bound).days > 80:
logger.warning(f"Report API may not be able to look back this far. Some results may be incorrect.")
if lower_bound and ((datetime.date.today() - lower_bound).days > 80):
logger.warning(
"Report API may not be able to look back this far. Some results may be incorrect."
)

upper_bound, lower_bound = self._ensure_upper_lower_bound(
lower_bound, upper_bound
Expand Down

0 comments on commit 223995b

Please sign in to comment.