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 @@ -70,6 +70,7 @@ write_to = "pytest_asyncio/_version.py"
7070line-length = 88
7171format.docstring-code-format = true
7272lint.select = [
73+ " B" , # bugbear
7374 " E" , # pycodestyle
7475 " F" , # pyflakes
7576 " PGH004" , # pygrep-hooks - Use specific rule codes when using noqa
@@ -80,6 +81,10 @@ lint.select = [
8081 " UP" , # pyupgrade
8182 " W" , # pycodestyle
8283]
84+ lint.ignore = [
85+ # bugbear ignore
86+ " B028" , # No explicit `stacklevel` keyword argument found
87+ ]
8388
8489[tool .pytest .ini_options ]
8590python_files = [
Original file line number Diff line number Diff line change @@ -183,11 +183,11 @@ def _get_asyncio_mode(config: Config) -> Mode:
183183 val = config .getini ("asyncio_mode" )
184184 try :
185185 return Mode (val )
186- except ValueError :
186+ except ValueError as e :
187187 modes = ", " .join (m .value for m in Mode )
188188 raise pytest .UsageError (
189189 f"{ val !r} is not a valid asyncio_mode. Valid modes: { modes } ."
190- )
190+ ) from e
191191
192192
193193_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET = """\
You can’t perform that action at this time.
0 commit comments