Skip to content

Commit

Permalink
[python] Make dummy classes constructible with any arguments (#4749)
Browse files Browse the repository at this point in the history
* Make dummy classes constructible with any arguments

* Update compat.py
  • Loading branch information
StrikerRUS committed Oct 30, 2021
1 parent d62378b commit 9a7562d
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions python-package/lightgbm/compat.py
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

0 comments on commit 9a7562d

Please sign in to comment.