Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
b60068c8
Unverified
Commit
b60068c8
authored
Feb 21, 2024
by
James Lamb
Committed by
GitHub
Feb 21, 2024
Browse files
[python-package] fix mypy error about pyarrow data (#6333)
parent
008ebaf2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
.ci/test.sh
.ci/test.sh
+1
-0
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+1
-1
No files found.
.ci/test.sh
View file @
b60068c8
...
@@ -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"
...
...
python-package/lightgbm/basic.py
View file @
b60068c8
...
@@ -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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment