@@ -88,7 +88,7 @@ def profile(
88
88
module , classname = reader .rsplit ("." , 1 )
89
89
reader = getattr (importlib .import_module (module ), classname ) # noqa
90
90
if not issubclass (reader , (BaseReader , MultiBandReader , MultiBaseReader )):
91
- warnings .warn (f"Invalid reader type: { type (reader )} " )
91
+ warnings .warn (f"Invalid reader type: { type (reader )} " , stacklevel = 1 )
92
92
93
93
Reader = reader or COGReader
94
94
@@ -159,7 +159,7 @@ def get_zooms(input, reader, tms):
159
159
module , classname = reader .rsplit ("." , 1 )
160
160
reader = getattr (importlib .import_module (module ), classname ) # noqa
161
161
if not issubclass (reader , (BaseReader , MultiBandReader , MultiBaseReader )):
162
- warnings .warn (f"Invalid reader type: { type (reader )} " )
162
+ warnings .warn (f"Invalid reader type: { type (reader )} " , stacklevel = 1 )
163
163
164
164
Reader = reader or COGReader
165
165
@@ -191,7 +191,7 @@ def random(input, zoom, reader, tms):
191
191
module , classname = reader .rsplit ("." , 1 )
192
192
reader = getattr (importlib .import_module (module ), classname ) # noqa
193
193
if not issubclass (reader , (BaseReader , MultiBandReader , MultiBaseReader )):
194
- warnings .warn (f"Invalid reader type: { type (reader )} " )
194
+ warnings .warn (f"Invalid reader type: { type (reader )} " , stacklevel = 1 )
195
195
196
196
Reader = reader or COGReader
197
197
@@ -253,7 +253,7 @@ def viz(src_path, port, host, server_only, reader, config):
253
253
module , classname = reader .rsplit ("." , 1 )
254
254
reader = getattr (importlib .import_module (module ), classname ) # noqa
255
255
if not issubclass (reader , (BaseReader )):
256
- warnings .warn (f"Invalid reader type: { type (reader )} " )
256
+ warnings .warn (f"Invalid reader type: { type (reader )} " , stacklevel = 1 )
257
257
258
258
Reader = reader or COGReader
259
259
0 commit comments