Commit 4552720
committed
MAINT: add stacklevel argument to warnings.warn
This fixes B028.
> No explicit stacklevel keyword argument found. The warn method from the
> warnings module uses a stacklevel of 1 by default. This will only show a stack
> trace for the line on which the warn method is called. It is therefore
> recommended to use a stacklevel of 2 or greater to provide more information to
> the user.
I personally do not find this error very useful, but let's just pass the
stacklevel argument and consider ignoring the error globally if we get
more cases like this where this is the intended behavior.
Signed-off-by: Filipe Laíns <lains@riseup.net>1 parent d854680 commit 4552720
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
119 | 122 | | |
120 | 123 | | |
121 | 124 | | |
| |||
0 commit comments