Skip to content

Commit f2238d4

Browse files
committed
Apply automatic code formatting
1 parent 7e75861 commit f2238d4

File tree

9 files changed

+16
-70
lines changed

9 files changed

+16
-70
lines changed

lazypredict/models/classification.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@
1010
import numpy as np
1111
import pandas as pd
1212
from sklearn.base import ClassifierMixin
13-
from sklearn.metrics import (
14-
accuracy_score,
15-
balanced_accuracy_score,
16-
f1_score,
17-
roc_auc_score,
18-
)
13+
from sklearn.metrics import accuracy_score, balanced_accuracy_score, f1_score, roc_auc_score
1914
from sklearn.pipeline import Pipeline
2015
from tqdm import tqdm
2116

lazypredict/utils/__init__.py

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,9 @@
66
import numpy as np
77
import pandas as pd
88

9-
from .base import (
10-
BaseLazy,
11-
check_X_y,
12-
get_model_name,
13-
)
14-
from .gpu import (
15-
get_best_model,
16-
get_cpu_model,
17-
is_cuml_available,
18-
is_gpu_available,
19-
)
20-
from .metrics import (
21-
get_classification_metrics,
22-
get_regression_metrics,
23-
)
9+
from .base import BaseLazy, check_X_y, get_model_name
10+
from .gpu import get_best_model, get_cpu_model, is_cuml_available, is_gpu_available
11+
from .metrics import get_classification_metrics, get_regression_metrics
2412
from .mlflow_utils import (
2513
configure_mlflow,
2614
end_run,
@@ -32,11 +20,7 @@
3220
log_params,
3321
start_run,
3422
)
35-
from .preprocessing import (
36-
categorical_cardinality_threshold,
37-
create_preprocessor,
38-
get_card_split,
39-
)
23+
from .preprocessing import categorical_cardinality_threshold, create_preprocessor, get_card_split
4024

4125
logger = logging.getLogger("lazypredict.utils")
4226

lazypredict/utils/preprocessing.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@
1010
from sklearn.compose import ColumnTransformer
1111
from sklearn.impute import SimpleImputer
1212
from sklearn.pipeline import Pipeline
13-
from sklearn.preprocessing import (
14-
OneHotEncoder,
15-
OrdinalEncoder,
16-
PolynomialFeatures,
17-
StandardScaler,
18-
)
13+
from sklearn.preprocessing import OneHotEncoder, OrdinalEncoder, PolynomialFeatures, StandardScaler
1914

2015
logger = logging.getLogger("lazypredict.preprocessing")
2116

tests/test_base.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,7 @@ def setUp(self):
155155

156156
def test_metrics_import(self):
157157
try:
158-
from lazypredict.metrics import (
159-
get_classification_metrics,
160-
get_regression_metrics,
161-
)
158+
from lazypredict.metrics import get_classification_metrics, get_regression_metrics
162159

163160
self.assertTrue(callable(get_classification_metrics))
164161
self.assertTrue(callable(get_regression_metrics))

tests/test_helpers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ class TestHelpers(unittest.TestCase):
1111

1212
def test_get_card_split(self):
1313
"""Test categorical cardinality threshold function."""
14-
from lazypredict.utils.preprocessing import (
15-
categorical_cardinality_threshold,
16-
)
14+
from lazypredict.utils.preprocessing import categorical_cardinality_threshold
1715

1816
# Create test data with known cardinality
1917
data = pd.DataFrame(

tests/test_integration.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,7 @@ def test_regression_direct_import(self):
110110
def test_supervised_backwards_compatibility(self):
111111
try:
112112
# Test with minimal models (just one) to keep tests fast
113-
from sklearn.tree import (
114-
DecisionTreeClassifier,
115-
DecisionTreeRegressor,
116-
)
113+
from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
117114

118115
from lazypredict.Supervised import LazyClassifier, LazyRegressor
119116

tests/test_model_registry.py

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ class TestModelRegistry(unittest.TestCase):
1212
def test_classification_registry(self):
1313
"""Test classification model registry."""
1414
try:
15-
from lazypredict.models.model_registry import (
16-
CLASSIFIERS,
17-
get_classification_models,
18-
)
15+
from lazypredict.models.model_registry import CLASSIFIERS, get_classification_models
1916

2017
# Test getting all models
2118
models = get_classification_models()
@@ -37,10 +34,7 @@ def test_classification_registry(self):
3734
def test_regression_registry(self):
3835
"""Test regression model registry."""
3936
try:
40-
from lazypredict.models.model_registry import (
41-
REGRESSORS,
42-
get_regression_models,
43-
)
37+
from lazypredict.models.model_registry import REGRESSORS, get_regression_models
4438

4539
# Test getting all models
4640
models = get_regression_models()
@@ -62,10 +56,7 @@ def test_regression_registry(self):
6256
def test_classifier_filter(self):
6357
"""Test classifier filtering."""
6458
try:
65-
from lazypredict.models.model_registry import (
66-
CLASSIFIERS,
67-
filter_models,
68-
)
59+
from lazypredict.models.model_registry import CLASSIFIERS, filter_models
6960

7061
# Test filtering with exclude list
7162
filtered = filter_models(CLASSIFIERS, exclude=["RandomForestClassifier"])
@@ -85,10 +76,7 @@ def test_classifier_filter(self):
8576
def test_regressor_filter(self):
8677
"""Test regressor filtering."""
8778
try:
88-
from lazypredict.models.model_registry import (
89-
REGRESSORS,
90-
filter_models,
91-
)
79+
from lazypredict.models.model_registry import REGRESSORS, filter_models
9280

9381
# Test filtering with exclude list
9482
filtered = filter_models(REGRESSORS, exclude=["RandomForestRegressor"])
@@ -108,9 +96,7 @@ def test_regressor_filter(self):
10896
def test_classifier_initialization(self):
10997
"""Test classifier initialization."""
11098
try:
111-
from lazypredict.models.model_registry import (
112-
get_classification_models,
113-
)
99+
from lazypredict.models.model_registry import get_classification_models
114100

115101
models = get_classification_models()
116102
for model_class in models:

tests/test_supervised.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,7 @@ def test_mlflow_integration(self):
158158

159159
import unittest
160160

161-
from lazypredict import (
162-
LazyClassifier,
163-
LazyRegressor,
164-
Supervised,
165-
)
161+
from lazypredict import LazyClassifier, LazyRegressor, Supervised
166162

167163

168164
class TestSupervisedModule(unittest.TestCase):

tests/test_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ def setUp(self):
101101
def test_categorical_cardinality_threshold(self):
102102
"""Test categorical cardinality threshold function."""
103103
try:
104-
from lazypredict.utils.preprocessing import (
105-
categorical_cardinality_threshold,
106-
)
104+
from lazypredict.utils.preprocessing import categorical_cardinality_threshold
107105

108106
data = pd.DataFrame(
109107
{

0 commit comments

Comments
 (0)