mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
[flake8-bugbear
] Skip B028
if warnings.warn
is called with *args
or **kwargs
(#14870)
This commit is contained in:
parent
172143ae77
commit
9c3c59aca9
3 changed files with 31 additions and 13 deletions
|
@ -11,6 +11,13 @@ warnings.warn("test", DeprecationWarning, source=None, stacklevel=2)
|
|||
warnings.warn("test", DeprecationWarning, stacklevel=1)
|
||||
warnings.warn("test", DeprecationWarning, 1)
|
||||
warnings.warn("test", category=DeprecationWarning, stacklevel=1)
|
||||
args = ("test", DeprecationWarning, 1)
|
||||
warnings.warn(*args)
|
||||
kwargs = {"message": "test", "category": DeprecationWarning, "stacklevel": 1}
|
||||
warnings.warn(**kwargs)
|
||||
args = ("test", DeprecationWarning)
|
||||
kwargs = {"stacklevel": 1}
|
||||
warnings.warn(*args, **kwargs)
|
||||
|
||||
warnings.warn(
|
||||
"test",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue