diff --git a/countess/core/plugins.py b/countess/core/plugins.py index 7aee1ed..e4dbc00 100644 --- a/countess/core/plugins.py +++ b/countess/core/plugins.py @@ -430,17 +430,20 @@ class PandasTransformXToTupleMixin: def __init__(self, *a, **k): super().__init__(*a, **k) + assert hasattr(self, "parameters") assert isinstance(self.parameters["output"], ArrayParam) assert all(isinstance(pp["name"], StringParam) for pp in self.parameters["output"]) def series_to_dataframe(self, series: pd.Series) -> pd.DataFrame: + assert hasattr(self, "parameters") + assert isinstance(self.parameters["output"], ArrayParam) + assert all(isinstance(pp["name"], StringParam) for pp in self.parameters["output"]) column_names = [ - pp.name.value or "Column %d" % n - for n, pp in enumerate(self.parameters["output"], 1) + pp.name.value or "Column %d" % n for n, pp in enumerate(self.parameters["output"], 1) ] # type: ignore [attr-defined] data = series.tolist() - column_names = column_names[:len(data[0])] + column_names = column_names[: len(data[0])] df = pd.DataFrame(data, columns=column_names, index=series.index) return df diff --git a/countess/gui/main.py b/countess/gui/main.py index b32845c..82e2c86 100644 --- a/countess/gui/main.py +++ b/countess/gui/main.py @@ -126,7 +126,6 @@ def show_config_subframe(self): self.config_canvas.bind("", self.on_config_canvas_configure) def on_config_canvas_configure(self, *_): - self.config_canvas.itemconfigure(self.config_subframe_id, width=self.config_canvas.winfo_width()) def on_label_configure(self, *_):