Commit 05b111d
Fix UnboundLocalError in test_type_imports.py and add --ignore-missing-imports to mypy test
Fixed two CI errors:
1. test_type_imports.py: UnboundLocalError when referencing unassigned variables
- Wrapped type annotations in `if False:` block
- Variables are never assigned/used at runtime (avoid UnboundLocalError)
- Mypy still validates the type annotations exist
2. test_mypy.py: Failures due to missing optional dependencies
- Added `--ignore-missing-imports` flag to mypy command
- Skips type checking for optional dependencies (skimage, cv2)
- These are not part of rawpy's required dependencies
- Prevents scipy-stubs installation errors
- Prevents skimage/cv2 import-not-found errors in enhance.py
The enhance.py issues (skimage.filter.rank, cv2) are now ignored since
those are optional dependencies that may not be installed.
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>1 parent 38a1e74 commit 05b111d
2 files changed
+18
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
0 commit comments