chore: Simplify boolean if expression (#2944)

This commit is contained in:
Yasser Tahiri 2023-10-28 21:06:24 +01:00 committed by GitHub
commit b812f2ad1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 24 deletions

View file

@ -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