Skip to content

Commit

Permalink
Set mypypath dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
deltamarnix committed Feb 13, 2024
1 parent 11a9719 commit 76fd4ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ strict_concatenate = True
disallow_subclassing_any = True
disallow_untyped_decorators = True
disallow_any_generics = True
mypy_path=.pixi/envs/default/Library/python:.pixi/envs/default/share/qgis/python

# Ignore errors for imported packages.
[mypy-console.*]
Expand Down
6 changes: 6 additions & 0 deletions utils/env_setup.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
set JULIAUP_DEPOT_PATH=%~dp0
set QUARTO_PYTHON=python

setlocal EnableDelayedExpansion
set "current_dir=%CD%\"
set "conda_prefix=%CONDA_PREFIX%\"
set "relative_conda_prefix=!conda_prefix:%CD%=.!"
endlocal & set MYPYPATH="%relative_conda_prefix%Library\python"
3 changes: 3 additions & 0 deletions utils/env_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ JULIAUP_DEPOT_PATH=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null &
export JULIAUP_DEPOT_PATH
QUARTO_PYTHON=python
export QUARTO_PYTHON
relative_conda_prefix=$(realpath --relative-to="$PWD" "$CONDA_PREFIX")
MYPYPATH=$relative_conda_prefix/share/qgis/python
export MYPYPATH

0 comments on commit 76fd4ac

Please sign in to comment.