From d3ba2ca2af8cd1a23bf01ebc9e847e7fc19e6f85 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 29 Jul 2024 18:09:36 -0700 Subject: [PATCH] warn at higher stacklevel --- fatamorgana/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fatamorgana/basic.py b/fatamorgana/basic.py index fcd5d0b..315e377 100644 --- a/fatamorgana/basic.py +++ b/fatamorgana/basic.py @@ -1221,7 +1221,7 @@ class GridRepetition: if b_count < 2: b_count = None b_vector = None - warnings.warn('Removed b_count and b_vector since b_count == 1') + warnings.warn('Removed b_count and b_vector since b_count == 1', stacklevel=2) if a_count < 2: raise InvalidDataError(f'Repetition has too-small a_count: {a_count}')