Compare commits

...

3 Commits

Author SHA1 Message Date
Obeida Shamoun
9efcea762e
hooks: only check for require_poetry in env config 2023-07-06 14:33:29 +02:00
Obeida Shamoun
fe95ff5ca1
hooks: remove obsolete install_project_deps ternary 2023-07-06 14:32:26 +02:00
Obeida Shamoun
6991f29b4d
hooks: remove commented code 2023-07-06 14:31:03 +02:00

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
@ -140,19 +141,13 @@ def tox_on_install(
f"Identified {len(env_deps)} environment dependencies to install to env"
)
install_project_deps = (
tox_env.conf["install_project_deps"]
if tox_env.conf["install_project_deps"] is not None
else (not tox_env.conf["skip_install"] and not tox_env.core["no_package"])
)
# extras are not set in a testenv if skip_install=true
try:
extras = tox_env.conf["extras"]
except KeyError:
extras = []
if install_project_deps:
if tox_env.conf["install_project_deps"]:
project_deps = utilities.find_project_deps(
packages, virtualenv, poetry, extras
)
@ -166,7 +161,6 @@ def tox_on_install(
logger.error(str(err))
raise err
except Exception as err:
# tox_env.status = "InternalError"
logger.error(f"Internal plugin error: {err}")
raise err