tadeja commented on code in PR #55264:
URL: https://github.com/apache/arrow/pull/55264#discussion_r4605886817
##########
python/pyarrow/tests/test_schema.py:
##########
@@ -23,7 +23,7 @@
try:
import numpy as np
except ImportError:
- np = None
+ np = None # type: ignore[assignment]
Review Comment:
Yes, only for type checking. Tests that use `np` have
`@pytest.mark.numpy`/`pandas`, so they're skipped without NumPy. These `# type:
ignore[assignment]` in pyarrow/tests were added in ff91bcf, and without them
mypy reports harmless errors on test files which aren't checked in CI. For
example, from the arrow/python directory:
```console
% mypy pyarrow/tests/test_schema.py
pyarrow/tests/test_schema.py:26: error: Incompatible types in assignment
(expression has type "None", variable has type Module) [assignment]
Found 1 error in 1 file
% mypy pyarrow/tests/test_array.py
pyarrow/tests/test_array.py:34: error: Incompatible types in assignment
(expression has type "None", variable has type Module) [assignment]
Found 1 error in 1 file
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]