Skip to content

Commit 0ec2085

Browse files
committed
fix(linting): code formatting
1 parent 01b25cc commit 0ec2085

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

src/ydata_profiling/expectations_report.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ def to_expectation_suite(
7979
if not data_context:
8080
data_context = ge.data_context.DataContext()
8181

82-
suite = data_context.add_expectation_suite(
83-
suite_name
84-
)
82+
suite = data_context.add_expectation_suite(suite_name)
8583

8684
# Instantiate an in-memory pandas dataset
8785
batch = ge.dataset.PandasDataset(self.df, expectation_suite=suite)

src/ydata_profiling/utils/logger.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111

1212
class ProfilingLogger(logging.Logger):
13-
def __init__(self, name: str, level: int =logging.INFO):
13+
def __init__(self, name: str, level: int = logging.INFO):
1414
super().__init__(name, level)
1515

16-
def info_def_report(self, dataframe, timeseries: bool) -> None: # type: ignore
16+
def info_def_report(self, dataframe, timeseries: bool) -> None: # type: ignore
1717
if dataframe is pd.DataFrame:
1818
dataframe = "pandas"
1919
report_type = "regular"

src/ydata_profiling/visualisation/plot.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,11 @@ def _prepare_heatmap_data(
839839
)
840840

841841
df = df.groupby([entity_column, "__bins"])[sortbykey].count()
842-
df = df.reset_index().pivot_table(values=sortbykey, index="__bins", columns=entity_column).T
842+
df = (
843+
df.reset_index()
844+
.pivot_table(values=sortbykey, index="__bins", columns=entity_column)
845+
.T
846+
)
843847

844848
if selected_entities:
845849
df = df[selected_entities]

tests/unit/test_ge_integration.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ def test_to_expectations_suite_title(context, df):
9292
run_validation=False,
9393
)
9494

95-
context.add_expectation_suite.assert_called_once_with(
96-
"expectations-dataset"
97-
)
95+
context.add_expectation_suite.assert_called_once_with("expectations-dataset")
9896

9997

10098
def test_to_expectation_suite_no_context(mod, df):

tests/unit/test_plot.py

-1
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,3 @@ def test_timeseries_heatmap(dataframe: pd.DataFrame):
9797
df = _prepare_heatmap_data(dataframe, "entity")
9898
plot = _create_timeseries_heatmap(df)
9999
assert isinstance(plot, Axes)
100-

0 commit comments

Comments
 (0)