Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81cb6814 authored by Abel Lucas's avatar Abel Lucas Committed by Automerger Merge Worker
Browse files

Merge "avatar: directly use venv" am: eb7edfcb am: 806ef0ec

parents 8d440733 806ef0ec
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -42,7 +42,8 @@ _PANDORA_PYTHON_PATHS=(

if [[ "$1" =~ ^('format'|'lint'|'run')$ ]]; then
  [ ! -d "${_VENV_DIR}" ] && python3 -m venv "${_VENV_DIR}"
  python3 -m pip install \
  source "${_VENV_DIR}"/bin/activate
  pip install \
    'grpcio==1.51.1' \
    'cryptography==35' \
    'protobuf==4.22.1' \
@@ -56,14 +57,14 @@ fi

case "$1" in
  'format') shift
    python3 -m black -S -l 119 "$@" "${_PY_SOURCES[@]}"
    python3 -m isort --profile black -l 119 --ds --lbt 1 --ca "$@" "${_PY_SOURCES[@]}"
    black -S -l 119 "$@" "${_PY_SOURCES[@]}"
    isort --profile black -l 119 --ds --lbt 1 --ca "$@" "${_PY_SOURCES[@]}"
  ;;
  'lint') shift
    python3 -m mypy \
    mypy \
      --pretty --show-column-numbers --strict --no-warn-unused-ignores --ignore-missing-imports \
      "$@" "${_PY_SOURCES[@]}" || exit 1
    python3 -m pyright \
    pyright \
      -p "${_TEST_ROOT}" \
      "$@" "${_PY_SOURCES[@]}"
  ;;