hooks: only check for require_poetry in env config

This commit is contained in:
Obeida Shamoun 2023-07-06 14:33:29 +02:00
parent fe95ff5ca1
commit 9efcea762e
No known key found for this signature in database
GPG Key ID: C393AE9D78004C18
1 changed files with 3 additions and 2 deletions

View File

@ -93,8 +93,9 @@ def tox_on_install(
try:
poetry = utilities.check_preconditions(tox_env)
except exceptions.SkipEnvironment as err:
if isinstance(err, exceptions.PoetryNotInstalledError) and (
tox_env.core["require_poetry"] or tox_env.conf["require_poetry"]
if (
isinstance(err, exceptions.PoetryNotInstalledError)
and tox_env.conf["require_poetry"]
):
logger.error(str(err))
raise err