File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -333,11 +333,9 @@ def _use_asyncio_selector_if_required(config):
333333 # https://twistedmatrix.com/trac/ticket/9766
334334 # https://github.com/pytest-dev/pytest-twisted/issues/80
335335
336- if (
337- config .getoption ("reactor" , "default" ) == "asyncio"
338- and sys .platform == 'win32'
339- and sys .version_info >= (3 , 8 )
340- ):
336+ is_asyncio = config .getoption ("reactor" , "default" ) == "asyncio"
337+
338+ if is_asyncio and sys .platform == 'win32' and sys .version_info >= (3 , 8 ):
341339 import asyncio
342340
343341 selector_policy = asyncio .WindowsSelectorEventLoopPolicy ()
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ download=true
2626
2727[testenv:linting]
2828deps =flake8
29- commands =flake8 * .py testing
29+ commands =flake8 setup.py pytest_twisted .py testing
3030
3131[flake8]
3232ignore =N802
You can’t perform that action at this time.
0 commit comments