Skip to content

Commit 2cbcf96

Browse files
encukouhroncok
authored andcommitted
Make tox_dependencies() a generator
1 parent beda06a commit 2cbcf96

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/tox_current_env/hooks.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,10 @@ def tox_testenv_install_deps(venv, action):
199199

200200
def tox_dependencies(config):
201201
"""Get dependencies of tox itself, 'minversion' and 'requires' config options"""
202-
# config does not have this attribute until tox 3.22:
203-
deps = getattr(config, "requires", [])
204202
if config.minversion is not None:
205-
deps.insert(0, f"tox >= {config.minversion}")
206-
return deps
203+
yield f"tox >= {config.minversion}"
204+
# config does not have the "requires" attribute until tox 3.22:
205+
yield from getattr(config, "requires", [])
207206

208207

209208
@tox.hookimpl

0 commit comments

Comments
 (0)