Skip to content

Commit f88d1e8

Browse files
committed
Apply ruff formatting
1 parent f6895f3 commit f88d1e8

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

malariagen_data/anoph/frq_base.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ def _prep_samples_for_cohort_grouping(*, df_samples, area_by, period_by, taxon_b
5353
)
5454

5555
# Raise a ValueError if the specified period_by column does not contain instances pd.Period.
56-
if not df_samples[period_by].apply(
57-
lambda value: pd.isnull(value) or isinstance(value, pd.Period)
58-
).all():
56+
if (
57+
not df_samples[period_by]
58+
.apply(lambda value: pd.isnull(value) or isinstance(value, pd.Period))
59+
.all()
60+
):
5961
raise TypeError(
6062
f"Invalid values in {period_by!r} column. Must be either pandas.Period or null."
6163
)

0 commit comments

Comments
 (0)