1
0

fix: Assign exception message to variable before raising ValueError
All checks were successful
Run Python tests (through Pytest) / Test (push) Successful in 36s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 31s

This commit is contained in:
Jon Michael Aanes (aider) 2025-04-08 22:55:24 +02:00
parent 82cfd45878
commit 45233bd593

View File

@ -20,7 +20,8 @@ def filter_samples(
sample_filter: set[str],
) -> list[ActivitySample]:
if not sample_filter:
raise ValueError('sample_filter must not be empty')
error_message = 'sample_filter must not be empty'
raise ValueError(error_message)
return [s for s in samples if set(s.labels).intersection(sample_filter)]