Skip to content

Commit

Permalink
fix pyright warning about opencv; exercise opencv code in GA.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianPugh committed Dec 21, 2024
1 parent 06a70b0 commit 3e03934
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,17 @@ jobs:
source ${{ env.ACTIVATE_PYTHON_VENV }}
pre-commit run --show-diff-on-failure --color=always --all-files
- name: Run tests
- name: Run tests (standard install)
run: |
source ${{ env.ACTIVATE_PYTHON_VENV }}
python -m pytest
- name: Install opencv
run: |
source ${{ env.ACTIVATE_PYTHON_VENV }}
pip install opencv-python
- name: Run tests (with opencv)
run: |
source ${{ env.ACTIVATE_PYTHON_VENV }}
python -m pytest
2 changes: 1 addition & 1 deletion py360convert/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from scipy.spatial.transform import Rotation

try:
import cv2
import cv2 # pyright: ignore[reportMissingImports]
except ImportError:
cv2 = None

Expand Down

0 comments on commit 3e03934

Please sign in to comment.