Skip to content

Commit c4e8f6b

Browse files
committed
update stacklevel
1 parent 355e3c9 commit c4e8f6b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

parcels/tools/_helpers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
PACKAGE = "Parcels"
88

99

10-
def deprecated(msg: str = "", stacklevel: int = 2) -> Callable:
10+
def deprecated(msg: str = "") -> Callable:
1111
"""Decorator marking a function as being deprecated
1212
1313
Parameters
@@ -37,7 +37,7 @@ def wrapper(*args, **kwargs):
3737
f"`{func.__qualname__}` is deprecated and will be removed in a future release of {PACKAGE}.{msg}"
3838
)
3939

40-
warnings.warn(msg_formatted, category=DeprecationWarning, stacklevel=stacklevel)
40+
warnings.warn(msg_formatted, category=DeprecationWarning, stacklevel=3)
4141
return func(*args, **kwargs)
4242

4343
return wrapper
@@ -50,5 +50,4 @@ def deprecated_made_private(func: Callable) -> Callable:
5050
"It has moved to the internal API as it is not expected to be directly used by "
5151
"the end-user. If you feel that you use this code directly in your scripts, please "
5252
"comment on our tracking issue at <>.", # TODO: Add tracking issue
53-
stacklevel=3,
5453
)(func)

0 commit comments

Comments
 (0)