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

Commit 6aa85895 authored by David Duarte's avatar David Duarte
Browse files

avatar.sh: Only export PYTHONPATH for lint

The PYTHONPATH is only used by the linter and defining it for run
as well makes its purpose confusing.

Bug: 308169841
Test: avatar run --mobly-std-log
Test: avatar lint
Change-Id: Ia4b8962d62f9994ee44e996ba0986da8abe55a99
parent 15b3c273
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ if [[ "$1" =~ ^('format'|'lint'|'run')$ ]]; then
    'types-protobuf==4.24.0.1' \
    'black==23.7.0' \
    'isort==5.12.0'
  export PYTHONPATH="$(IFS=:; echo "${_PANDORA_PYTHON_PATHS[*]}"):${PYTHONPATH}"
fi

case "$1" in
@@ -61,6 +60,7 @@ case "$1" in
    isort --profile black -l 119 --ds --lbt 1 --ca "$@" "${_PY_SOURCES[@]}"
  ;;
  'lint') shift
    export PYTHONPATH="$(IFS=:; echo "${_PANDORA_PYTHON_PATHS[*]}"):${PYTHONPATH}"
    mypy \
      --pretty --show-column-numbers --strict --no-warn-unused-ignores --ignore-missing-imports \
      "$@" "${_PY_SOURCES[@]}" || exit 1