-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Use stacklevel in warnings #2097
Copy link
Copy link
Closed
Labels
🔰 Good first issueA good task for those new to the libraryA good task for those new to the library⏩ type: EnhancementImprove existing featuresImprove existing features
Description
When you do warn('blah') somewhere in scikit-image, the user gets that line-number whenever the warning is raised. If the warning message is "you've used a deprecated keyword argument", e.g., the correct line to return is where the user called skimage. To fix this, use the correct stacklevel argument in warn.
For an example of correct usage, take a look at numpy.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🔰 Good first issueA good task for those new to the libraryA good task for those new to the library⏩ type: EnhancementImprove existing featuresImprove existing features