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] Make dummy classes constructible with any arguments #4749

Merged
merged 2 commits into from
Oct 30, 2021
Merged
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
21 changes: 14 additions & 7 deletions python-package/lightgbm/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
class pd_Series: # type: ignore
"""Dummy class for pandas.Series."""

pass
def __init__(self, *args, **kwargs):
pass

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

pass
def __init__(self, *args, **kwargs):
pass

concat = None
is_dtype_sparse = None
Expand Down Expand Up @@ -52,7 +54,8 @@ class pd_DataFrame: # type: ignore
class dt_DataTable: # type: ignore
"""Dummy class for datatable.DataTable."""

pass
def __init__(self, *args, **kwargs):
pass


"""sklearn"""
Expand Down Expand Up @@ -143,19 +146,23 @@ class _LGBMRegressorBase: # type: ignore
class Client: # type: ignore
"""Dummy class for dask.distributed.Client."""

pass
def __init__(self, *args, **kwargs):
pass

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

pass
def __init__(self, *args, **kwargs):
pass

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

pass
def __init__(self, *args, **kwargs):
pass

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

pass
def __init__(self, *args, **kwargs):
pass