Commit 204911b
Cipher
fix: improve stacklevel in register() warning for better traceback
The register() method's warning about non-ImageReader instances now uses
stacklevel=3 instead of stacklevel=2. This correctly points to the LoadImage()
call site where the reader is being instantiated, rather than internal frames.
Stack trace:
- User code: LoadImage(reader=...)
- LoadImage.__init__()
- self.register()
- warnings.warn(stacklevel=3) → points to LoadImage() call
This improves debugging experience for users who pass invalid readers.
Signed-off-by: Cipher <cipher@openclaw.ai>1 parent 60cb0d9 commit 204911b
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| |||
0 commit comments