Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress missing values from detailed forecast results #89

Merged
merged 1 commit into from
Apr 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion pynws/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ def get_details_for_time(

details: Dict[Detail, DetailValue] = {}
for detail, time_values in self.details.items():
details[detail] = self._get_value_for_time(when, time_values)
value = self._get_value_for_time(when, time_values)
if value is not None:
details[detail] = value
return details

def get_details_for_times(
Expand Down