From 679f71ee8f06fd7cc2399b1a3d37db07fe9056a9 Mon Sep 17 00:00:00 2001 From: "M. Teodoro" Date: Fri, 10 Jan 2025 17:16:36 -0500 Subject: [PATCH] Fix missing stacklevel keyword in call to warnings.warn(). --- romancal/resample/resample_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/romancal/resample/resample_utils.py b/romancal/resample/resample_utils.py index 34a682ffa..199aec7d4 100644 --- a/romancal/resample/resample_utils.py +++ b/romancal/resample/resample_utils.py @@ -175,7 +175,8 @@ def build_driz_weight( inv_sky_variance[~np.isfinite(inv_sky_variance)] = 1 else: warnings.warn( - "var_rnoise and var_poisson arrays are not available. Setting drizzle weight map to 1" + "var_rnoise and var_poisson arrays are not available. Setting drizzle weight map to 1", + stacklevel=2, ) inv_sky_variance = 1.0 result = inv_sky_variance * dqmask