Skip to content

Use stacklevel in warnings #2097

@stefanv

Description

@stefanv

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions