From f7a74054c344d1dccc476c09172b960d246533dd Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 16 Feb 2023 22:40:54 -0600 Subject: [PATCH] [python-package] fix mypy error about ctypes array creation --- python-package/lightgbm/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-package/lightgbm/basic.py b/python-package/lightgbm/basic.py index beec24242499..4f3b47477816 100644 --- a/python-package/lightgbm/basic.py +++ b/python-package/lightgbm/basic.py @@ -312,7 +312,7 @@ def _c_str(string: str) -> ctypes.c_char_p: def _c_array(ctype: type, values: List[Any]) -> ctypes.Array: """Convert a Python array to C array.""" - return (ctype * len(values))(*values) + return (ctype * len(values))(*values) # type: ignore[operator] def _json_default_with_numpy(obj: Any) -> Any: