Skip to content

Commit

Permalink
fix(linting): code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
azory-ydata committed Jul 8, 2024
1 parent 01b25cc commit 0ec2085
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
4 changes: 1 addition & 3 deletions src/ydata_profiling/expectations_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ def to_expectation_suite(
if not data_context:
data_context = ge.data_context.DataContext()

suite = data_context.add_expectation_suite(
suite_name
)
suite = data_context.add_expectation_suite(suite_name)

# Instantiate an in-memory pandas dataset
batch = ge.dataset.PandasDataset(self.df, expectation_suite=suite)
Expand Down
4 changes: 2 additions & 2 deletions src/ydata_profiling/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@


class ProfilingLogger(logging.Logger):
def __init__(self, name: str, level: int =logging.INFO):
def __init__(self, name: str, level: int = logging.INFO):
super().__init__(name, level)

def info_def_report(self, dataframe, timeseries: bool) -> None: # type: ignore
def info_def_report(self, dataframe, timeseries: bool) -> None: # type: ignore
if dataframe is pd.DataFrame:
dataframe = "pandas"
report_type = "regular"
Expand Down
6 changes: 5 additions & 1 deletion src/ydata_profiling/visualisation/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,11 @@ def _prepare_heatmap_data(
)

df = df.groupby([entity_column, "__bins"])[sortbykey].count()
df = df.reset_index().pivot_table(values=sortbykey, index="__bins", columns=entity_column).T
df = (
df.reset_index()
.pivot_table(values=sortbykey, index="__bins", columns=entity_column)
.T
)

if selected_entities:
df = df[selected_entities]
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/test_ge_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ def test_to_expectations_suite_title(context, df):
run_validation=False,
)

context.add_expectation_suite.assert_called_once_with(
"expectations-dataset"
)
context.add_expectation_suite.assert_called_once_with("expectations-dataset")


def test_to_expectation_suite_no_context(mod, df):
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,3 @@ def test_timeseries_heatmap(dataframe: pd.DataFrame):
df = _prepare_heatmap_data(dataframe, "entity")
plot = _create_timeseries_heatmap(df)
assert isinstance(plot, Axes)

0 comments on commit 0ec2085

Please sign in to comment.