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
74316c11
Unverified
Commit
74316c11
authored
Feb 16, 2023
by
James Lamb
Committed by
GitHub
Feb 16, 2023
Browse files
[python-package] fix mypy error about log callback (#5720)
parent
4887b3b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+1
-1
No files found.
python-package/lightgbm/basic.py
View file @
74316c11
...
...
@@ -146,7 +146,7 @@ def _load_lib() -> ctypes.CDLL:
lib
=
ctypes
.
cdll
.
LoadLibrary
(
lib_path
[
0
])
lib
.
LGBM_GetLastError
.
restype
=
ctypes
.
c_char_p
callback
=
ctypes
.
CFUNCTYPE
(
None
,
ctypes
.
c_char_p
)
lib
.
callback
=
callback
(
_log_callback
)
lib
.
callback
=
callback
(
_log_callback
)
# type: ignore[attr-defined]
if
lib
.
LGBM_RegisterLogCallback
(
lib
.
callback
)
!=
0
:
raise
LightGBMError
(
lib
.
LGBM_GetLastError
().
decode
(
'utf-8'
))
return
lib
...
...
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