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
7fd708df
Unverified
Commit
7fd708df
authored
Feb 14, 2023
by
James Lamb
Committed by
GitHub
Feb 14, 2023
Browse files
[python-package] fix mypy errors in compat.py and libpath.py (#5711)
parent
0f7983b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
python-package/lightgbm/compat.py
python-package/lightgbm/compat.py
+7
-5
python-package/lightgbm/libpath.py
python-package/lightgbm/libpath.py
+1
-1
No files found.
python-package/lightgbm/compat.py
View file @
7fd708df
# coding: utf-8
"""Compatibility library."""
from
typing
import
List
"""pandas"""
try
:
from
pandas
import
DataFrame
as
pd_DataFrame
...
...
@@ -147,11 +149,11 @@ try:
except
ImportError
:
DASK_INSTALLED
=
False
dask_array_from_delayed
=
None
dask_bag_from_delayed
=
None
dask_array_from_delayed
=
None
# type: ignore[assignment]
dask_bag_from_delayed
=
None
# type: ignore[assignment]
delayed
=
None
default_client
=
None
wait
=
None
default_client
=
None
# type: ignore[assignment]
wait
=
None
# type: ignore[assignment]
class
Client
:
# type: ignore
"""Dummy class for dask.distributed.Client."""
...
...
@@ -195,4 +197,4 @@ except ImportError:
def
_LGBMCpuCount
(
only_physical_cores
:
bool
=
True
):
return
cpu_count
()
__all__
=
[]
__all__
:
List
[
str
]
=
[]
python-package/lightgbm/libpath.py
View file @
7fd708df
...
...
@@ -4,7 +4,7 @@ from pathlib import Path
from
platform
import
system
from
typing
import
List
__all__
=
[]
__all__
:
List
[
str
]
=
[]
def
find_lib_path
()
->
List
[
str
]:
...
...
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