Unverified Commit b60068c8 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[python-package] fix mypy error about pyarrow data (#6333)

parent 008ebaf2
......@@ -76,6 +76,7 @@ if [[ $TASK == "lint" ]]; then
cpplint \
mypy \
'pre-commit>=3.6.0' \
'pyarrow>=14.0' \
'r-lintr>=3.1'
source activate $CONDA_ENV
echo "Linting Python code"
......
......@@ -364,7 +364,7 @@ def _is_2d_collection(data: Any) -> bool:
)
def _is_pyarrow_array(data: Any) -> bool:
def _is_pyarrow_array(data: Any) -> "TypeGuard[Union[pa_Array, pa_ChunkedArray]]":
"""Check whether data is a PyArrow array."""
return isinstance(data, (pa_Array, pa_ChunkedArray))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment