Skip to content

Commit 13d750d

Browse files
simplify the expression which transfers mark names to keywords
1 parent e986272 commit 13d750d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/_pytest/python.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,14 +1399,11 @@ def __init__(
13991399
# https://github.com/pytest-dev/pytest/issues/4569
14001400

14011401
self.keywords.update(
1402-
dict.fromkeys(
1403-
[
1404-
mark.name
1405-
for mark in self.iter_markers()
1406-
if mark.name not in self.keywords
1407-
],
1408-
True,
1409-
)
1402+
{
1403+
mark.name: True
1404+
for mark in self.iter_markers()
1405+
if mark.name not in self.keywords
1406+
}
14101407
)
14111408

14121409
if fixtureinfo is None:

0 commit comments

Comments
 (0)