tadeja commented on PR #55264:
URL: https://github.com/apache/arrow/pull/55264#issuecomment-6945083755

   Only a note on 7fa510f - this is to fix strict type checking errors "Missing 
type arguments" (`np.dtype`, `list`, `tuple`) and errors due to 
`np.typing.DTypeLike`.
   
   a) `mypy --strict`: numpy 2.1.3 had 7 errors, numpy 2.5.5 had 4 errors. With 
7fa510f zero errors.
   b) `pyright` (strict): numpy 2.1.3 had 50 errors, numpy 2.5.5 had 39 errors. 
With 7fa510f 34 errors remaining (mostly due to to-be annotated modules)
   
   <details><summary>Details</summary>
   <p>
   
   
   a) `python % mypy --strict` and numpy-2.1.3
   ```
   pyarrow-stubs/lib.pyi:37: error: Missing type arguments for generic type 
"tuple"  [type-arg]
   pyarrow-stubs/__lib/table.pyi:192: error: Missing type arguments for generic 
type "dtype"  [type-arg]
   pyarrow-stubs/__lib/table.pyi:251: error: Missing type arguments for generic 
type "dtype"  [type-arg]
   pyarrow-stubs/__lib/array.pyi:126: error: Missing type arguments for generic 
type "list"  [type-arg]
   pyarrow-stubs/__lib/array.pyi:126: error: Missing type arguments for generic 
type "tuple"  [type-arg]
   pyarrow-stubs/__lib/array.pyi:230: error: Missing type arguments for generic 
type "dtype"  [type-arg]
   pyarrow-stubs-tests/test_table.py:95: error: Missing type arguments for 
generic type "list"  [type-arg]
   ```
   
   python % mypy --strict and numpy 2.5.5
   ```
   pyarrow-stubs/lib.pyi:37: error: Missing type arguments for generic type 
"tuple"  [type-arg]
   pyarrow-stubs/__lib/array.pyi:126: error: Missing type arguments for generic 
type "list"  [type-arg]
   pyarrow-stubs/__lib/array.pyi:126: error: Missing type arguments for generic 
type "tuple"  [type-arg]
   pyarrow-stubs-tests/test_table.py:95: error: Missing type arguments for 
generic type "list"  [type-arg]
   Found 4 errors in 3 files (checked 25 source files)
   ```
   
   b) pyright (strict) and numpy-2.1.3
   
   ```
     ...
     /arrow/python/pyarrow-stubs/__lib/types.pyi:568:22 - error: Type of 
parameter "dtype" is unknown (reportUnknownParameterType)
     /arrow/python/pyarrow-stubs/__lib/types.pyi:568:29 - error: Type of 
"typing" is unknown (reportUnknownMemberType)
     /arrow/python/pyarrow-stubs/__lib/types.pyi:568:29 - error: Type of 
"DTypeLike" is unknown (reportUnknownMemberType)
     /arrow/python/pyarrow-stubs/__lib/types.pyi:568:32 - error: "typing" is 
not a known attribute of module "numpy" (reportAttributeAccessIssue)
     ...
   50 errors, 0 warnings, 0 informations
   ```
   
   pyright (strict) and numpy-2.5.5 errors in CI:
   
https://github.com/apache/arrow/actions/runs/43902765930/job/133423484153#step:6:11
   
https://github.com/apache/arrow/actions/runs/43902766009/job/133423485569#step:6:4754
   and 
https://github.com/apache/arrow/actions/runs/43902766096/job/133423485406#step:6:4758
   
   
   </p>
   </details> 
   
   For now we don't have strict type checking but I think it's good to fix 
errors ahead for potential switch to "strict" sometime later.
   
https://github.com/apache/arrow/blob/eac50b30daa0c409c12ad7398d5c0fb969dd70b2/python/pyproject.toml#L138
   


-- 
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]

Reply via email to