Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python-package] Some mypy fixes #3916

Merged
merged 4 commits into from
Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python-package/lightgbm/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, best_iteration, best_score):

# Callback environment used by callbacks
CallbackEnv = collections.namedtuple(
"LightGBMCallbackEnv",
"CallbackEnv",
jameslamb marked this conversation as resolved.
Show resolved Hide resolved
["model",
"params",
"iteration",
Expand Down
12 changes: 6 additions & 6 deletions python-package/lightgbm/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
except ImportError:
PANDAS_INSTALLED = False

class pd_Series:
class pd_Series: # type: ignore
"""Dummy class for pandas.Series."""

pass
AlbertoEAF marked this conversation as resolved.
Show resolved Hide resolved

class pd_DataFrame:
class pd_DataFrame: # type: ignore
"""Dummy class for pandas.DataFrame."""

pass
Expand Down Expand Up @@ -49,7 +49,7 @@ class pd_DataFrame:
except ImportError:
DATATABLE_INSTALLED = False

class dt_DataTable:
class dt_DataTable: # type: ignore
"""Dummy class for datatable.DataTable."""

pass
Expand Down Expand Up @@ -123,17 +123,17 @@ def _check_sample_weight(sample_weight, X, dtype=None):
default_client = None
wait = None

class dask_Array:
class dask_Array: # type: ignore
"""Dummy class for dask.array.Array."""

pass

class dask_DataFrame:
class dask_DataFrame: # type: ignore
"""Dummy class for dask.dataframe.DataFrame."""

pass

class dask_Series:
class dask_Series: # type: ignore
"""Dummy class for dask.dataframe.Series."""

pass