File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ write_to = "pytest_asyncio/_version.py"
73
73
line-length = 88
74
74
format.docstring-code-format = true
75
75
lint.select = [
76
+ " B" , # bugbear
76
77
" E" , # pycodestyle
77
78
" F" , # pyflakes
78
79
" PGH004" , # pygrep-hooks - Use specific rule codes when using noqa
@@ -83,6 +84,10 @@ lint.select = [
83
84
" UP" , # pyupgrade
84
85
" W" , # pycodestyle
85
86
]
87
+ lint.ignore = [
88
+ # bugbear ignore
89
+ " B028" , # No explicit `stacklevel` keyword argument found
90
+ ]
86
91
87
92
[tool .pytest .ini_options ]
88
93
python_files = [
Original file line number Diff line number Diff line change @@ -183,11 +183,11 @@ def _get_asyncio_mode(config: Config) -> Mode:
183
183
val = config .getini ("asyncio_mode" )
184
184
try :
185
185
return Mode (val )
186
- except ValueError :
186
+ except ValueError as e :
187
187
modes = ", " .join (m .value for m in Mode )
188
188
raise pytest .UsageError (
189
189
f"{ val !r} is not a valid asyncio_mode. Valid modes: { modes } ."
190
- )
190
+ ) from e
191
191
192
192
193
193
_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET = """\
You can’t perform that action at this time.
0 commit comments