Unverified Commit 7fd708df authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[python-package] fix mypy errors in compat.py and libpath.py (#5711)

parent 0f7983b6
# 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] = []
......@@ -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]:
......
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