Skip to content

Commit

Permalink
Point to the user's code for the file_hash warning (#259)
Browse files Browse the repository at this point in the history
Otherwise the traceback will point to our internal code, which isn't very helpful.
  • Loading branch information
hmaarrfk authored Aug 24, 2021
1 parent d8c281c commit 87f2bc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pooch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def file_hash(*args, **kwargs):
top-level namespace (`from pooch import file_hash`) instead, which is fully
backwards compatible with pooch >= 0.1.
"""
warnings.warn(message, DeprecationWarning)
warnings.warn(message, DeprecationWarning, stacklevel=2)
return new_file_hash(*args, **kwargs)


Expand Down

0 comments on commit 87f2bc6

Please sign in to comment.