docs: update black with revised standalone

This commit is contained in:
Daylin Morgan 2023-06-05 14:02:33 -05:00
parent dbc22489e6
commit 92da092791
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F

View file

@ -1,5 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# AUTOGENERATED by viv (v23.5a5-2-ge70afb3-dev) # AUTOGENERATED by viv (v23.5a5-9-g33e2ff5-dev)
# see `python3 <(curl -fsSL viv.dayl.in/viv.py) --help` # see `python3 <(curl -fsSL viv.dayl.in/viv.py) --help`
@ -22,9 +22,10 @@ def _viv_use(*pkgs, track_exe=False, name=""):
_id = sha256.hexdigest() _id = sha256.hexdigest()
if (env := cache / (name if name else _id)) not in cache.glob("*/") or force: if (env := cache / (name if name else _id)) not in cache.glob("*/") or force:
sys.stderr.write(f"generating new vivenv -> {env.name}\n") sys.stderr.write(f"generating new vivenv -> {env.name}\n")
venv.create(env, symlinks=True, with_pip=True, clear=True, upgrade_deps=True) venv.create(env, symlinks=True, clear=True)
run_kw = dict(zip(("stdout", "stderr"), ((None,) * 2 if verbose else (-1, 2)))) kw = dict(zip(("stdout", "stderr"), ((None,) * 2 if verbose else (-1, 2))))
p = run([env / "bin" / "pip", "install", "--force-reinstall", *spec], **run_kw) cmd = ["pip", "--python", str(env / "bin" / "python"), "install", *spec]
p = run(cmd, **kw)
if (rc := p.returncode) != 0: if (rc := p.returncode) != 0:
if env.is_dir(): if env.is_dir():
shutil.rmtree(env) shutil.rmtree(env)