"git@developer.sourcefind.cn:yangql/googletest.git" did not exist on "3121b2049e30d2579c03f841caf4049a2c45cdcd"
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 ...@@ -76,6 +76,7 @@ if [[ $TASK == "lint" ]]; then
cpplint \ cpplint \
mypy \ mypy \
'pre-commit>=3.6.0' \ 'pre-commit>=3.6.0' \
'pyarrow>=14.0' \
'r-lintr>=3.1' 'r-lintr>=3.1'
source activate $CONDA_ENV source activate $CONDA_ENV
echo "Linting Python code" echo "Linting Python code"
......
...@@ -364,7 +364,7 @@ def _is_2d_collection(data: Any) -> bool: ...@@ -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.""" """Check whether data is a PyArrow array."""
return isinstance(data, (pa_Array, pa_ChunkedArray)) 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