Skip to content

Commit

Permalink
Fix stacklevel in SnakeBidsApp warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pvandyken committed Feb 23, 2024
1 parent 1c9abb3 commit 28a2fb4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions snakebids/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,26 @@ def _check_deprecations(self):
"`SnakeBidsApp.parser` is deprecated and no longer has any effect. To "
"modify the parser, use the new `bidsapp` module."
)
warnings.warn(msg, stacklevel=1)
warnings.warn(msg, stacklevel=3)
if self.config is not None:
msg = (
"`SnakeBidsApp.config` is deprecated and no longer has any effect. To "
"modify the config, use the new `bidsapp` module."
)
warnings.warn(msg, stacklevel=1)
warnings.warn(msg, stacklevel=3)
if self.args is not None:
msg = (
"`SnakeBidsApp.args` is deprecated and no longer has any effect. To "
"modify CLI arguments, use the new `bidsapp` module."
)
warnings.warn(msg, stacklevel=1)
warnings.warn(msg, stacklevel=3)
if self.version is not None:
msg = (
"`SnakeBidsApp.version` is deprecated and no longer has any effect. To "
"explcitly set the app version, use the `snakebids.plugins.Version` "
"plugin"
)
warnings.warn(msg, stacklevel=1)
warnings.warn(msg, stacklevel=3)

def _get_args(self):
args: dict[str, Any] = {}
Expand Down

0 comments on commit 28a2fb4

Please sign in to comment.