mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
chore: Simplify boolean if expression ✨ (#2944)
This commit is contained in:
parent
e14f20bb99
commit
b812f2ad1c
3 changed files with 25 additions and 24 deletions
6
tasks.py
6
tasks.py
|
|
@ -8,7 +8,7 @@ PKG_NAME = "pelican"
|
|||
PKG_PATH = Path(PKG_NAME)
|
||||
DOCS_PORT = os.environ.get("DOCS_PORT", 8000)
|
||||
BIN_DIR = "bin" if os.name != "nt" else "Scripts"
|
||||
PTY = True if os.name != "nt" else False
|
||||
PTY = os.name != "nt"
|
||||
ACTIVE_VENV = os.environ.get("VIRTUAL_ENV", None)
|
||||
VENV_HOME = Path(os.environ.get("WORKON_HOME", "~/virtualenvs"))
|
||||
VENV_PATH = Path(ACTIVE_VENV) if ACTIVE_VENV else (VENV_HOME / PKG_NAME)
|
||||
|
|
@ -16,8 +16,8 @@ VENV = str(VENV_PATH.expanduser())
|
|||
VENV_BIN = Path(VENV) / Path(BIN_DIR)
|
||||
|
||||
TOOLS = ["poetry", "pre-commit", "psutil"]
|
||||
POETRY = which("poetry") if which("poetry") else (VENV_BIN / "poetry")
|
||||
PRECOMMIT = which("pre-commit") if which("pre-commit") else (VENV_BIN / "pre-commit")
|
||||
POETRY = which("poetry") or VENV_BIN / "poetry"
|
||||
PRECOMMIT = which("pre-commit") or VENV_BIN / "pre-commit"
|
||||
|
||||
|
||||
@task
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue