$ nox -rs lint
nox > Running session lint-3.8
nox > Re-using existing virtual environment at .nox/lint-3-8.
nox > poetry export --dev --format=requirements.txt --output=/tmp/tmpl2c9lseu
nox > pip install -c /tmp/tmpl2c9lseu flake8 flake8-annotations flake8-bandit flake8-black flake8-bugbear flake8-import-order
nox > Error: pip is not installed into the virtualenv, it is located at /home/per/.pyenv/shims/pip. Pass external=True into run() to explicitly allow this.
nox > Session lint-3.8 failed.
All other nox sessions complete successfully, all other being typeguard, mypy, safety, tests and black. Yet lint doesn't play ball. This is the code for it, think it's identical to yours.
def install_with_constraints(session, *args, **kwargs):
with tempfile.NamedTemporaryFile() as requirements:
session.run(
"poetry",
"export",
"--dev",
"--format=requirements.txt",
f"--output={requirements.name}",
external=True,
)
session.install(f"--constraint={requirements.name}", *args, **kwargs)
@nox.session(python=["3.8"])
def lint(session):
args = session.posargs or locations
install_with_constraints(
session,
"flake8",
"flake8-annotations",
"flake8-bandit",
"flake8-black",
"flake8-bugbear",
"flake8-import-order",
)
session.run("flake8", *args)
Any ideas? Having a hard time debugging on my own. Thanks for an awesome guide.