Skip to content

Commit 79abaa4

Browse files
committed
Add flake8-bugbear, and fix issues
1 parent 178b12f commit 79abaa4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,7 @@ repos:
2727
rev: "7.1.1"
2828
hooks:
2929
- id: flake8
30-
additional_dependencies: ["flake8-pyproject"]
30+
additional_dependencies: [
31+
"flake8-pyproject",
32+
"flake8-bugbear",
33+
]

src/pytest_bdd/scenario.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def find_fixturedefs_for_step(step: Step, fixturemanager: FixtureManager, node:
5151
# happens to be that _arg2fixturedefs is changed during the iteration so we use a copy
5252
fixture_def_by_name = list(fixturemanager._arg2fixturedefs.items())
5353
for fixturename, fixturedefs in fixture_def_by_name:
54-
for pos, fixturedef in enumerate(fixturedefs):
54+
for _, fixturedef in enumerate(fixturedefs):
5555
step_func_context = getattr(fixturedef.func, "_pytest_bdd_step_context", None)
5656
if step_func_context is None:
5757
continue

0 commit comments

Comments
 (0)