Merge pull request #4775 from asottile/stdlib
Replace flatten() with chain.from_iterable
This commit is contained in:
commit
f0e6bf7604
|
@ -4,6 +4,7 @@ from __future__ import print_function
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
import inspect
|
import inspect
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
@ -13,7 +14,6 @@ from collections import OrderedDict
|
||||||
import attr
|
import attr
|
||||||
import py
|
import py
|
||||||
import six
|
import six
|
||||||
from more_itertools import flatten
|
|
||||||
|
|
||||||
import _pytest
|
import _pytest
|
||||||
from _pytest import nodes
|
from _pytest import nodes
|
||||||
|
@ -1109,7 +1109,7 @@ class FixtureManager(object):
|
||||||
argnames = getfuncargnames(func, cls=cls)
|
argnames = getfuncargnames(func, cls=cls)
|
||||||
else:
|
else:
|
||||||
argnames = ()
|
argnames = ()
|
||||||
usefixtures = flatten(
|
usefixtures = itertools.chain.from_iterable(
|
||||||
mark.args for mark in node.iter_markers(name="usefixtures")
|
mark.args for mark in node.iter_markers(name="usefixtures")
|
||||||
)
|
)
|
||||||
initialnames = tuple(usefixtures) + argnames
|
initialnames = tuple(usefixtures) + argnames
|
||||||
|
|
Loading…
Reference in New Issue