From 8fd6896a715bd43ead3a9c8d3294931eebca0e04 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sun, 28 Jul 2024 20:41:17 -0700 Subject: [PATCH] set stacklevel=1 --- masque/file/svg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/masque/file/svg.py b/masque/file/svg.py index 09e3056..8c4b43d 100644 --- a/masque/file/svg.py +++ b/masque/file/svg.py @@ -50,7 +50,7 @@ def writefile( bounds = pattern.get_bounds(library=library) if bounds is None: bounds_min, bounds_max = numpy.array([[-1, -1], [1, 1]]) - warnings.warn('Pattern had no bounds (empty?); setting arbitrary viewbox') + warnings.warn('Pattern had no bounds (empty?); setting arbitrary viewbox', stacklevel=1) else: bounds_min, bounds_max = bounds @@ -117,7 +117,7 @@ def writefile_inverted( bounds = pattern.get_bounds(library=library) if bounds is None: bounds_min, bounds_max = numpy.array([[-1, -1], [1, 1]]) - warnings.warn('Pattern had no bounds (empty?); setting arbitrary viewbox') + warnings.warn('Pattern had no bounds (empty?); setting arbitrary viewbox', stacklevel=1) else: bounds_min, bounds_max = bounds