Skip to content

Commit 57d78df

Browse files
committed
FEAT: Begin adding annotations to average.py.
1 parent f904543 commit 57d78df

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

faslr/common/model.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,7 @@ def __init__(
473473
# Dialog box that pops up when you click the add average button.
474474
self.average_box = FAverageBox(
475475
parent=self,
476-
data=averages,
477-
selection_model=self.parent.selection_model
476+
data=averages
478477
)
479478

480479
self.layout.addWidget(self.add_average_button)

faslr/methods/expected_loss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def __init__(
210210
self.apriori_tab = QWidget()
211211

212212

213-
self.main_tabs.addTab(self.indexation, "Indexation")
213+
self.main_tabs.addTab(self.indexation, "Indexes")
214214
self.main_tabs.addTab(self.apriori_tab, "Apriori Selection")
215215

216216
self.apriori_view = ExpectedLossView()

faslr/model/average.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
if TYPE_CHECKING:
3838
from pandas import DataFrame
3939
from faslr.common.model import (
40-
FSelectionModel,
40+
FSelectionModelToolbox,
4141
FSelectionModelWidget
4242
)
4343

@@ -49,18 +49,15 @@ class FAverageBox(QDialog):
4949
Parameters
5050
----------
5151
parent: Optional[FSelectionModelWidget]
52-
The containing widget of the corresponding selection model.
53-
selection_model: Optional[FSelectionModel]
54-
The corresponding selection model.
52+
The containing toolbox of the corresponding selection model.
5553
title: Optional[str]
5654
The title of the dialog box, overriding the default.
5755
data: Optional[DataFrame]
5856
A dataframe containing the available averages. Overrides extraction of these averages from the database.
5957
"""
6058
def __init__(
6159
self,
62-
parent: Optional[FSelectionModelWidget],
63-
selection_model: Optional[FSelectionModel] = None,
60+
parent: Optional[FSelectionModelToolbox],
6461
title: Optional[str] = "Available Averages",
6562
data: Optional[DataFrame] = None
6663
):
@@ -69,9 +66,9 @@ def __init__(
6966

7067
self.layout = QVBoxLayout()
7168

72-
self.parent: FSelectionModelWidget = parent
69+
self.parent: FSelectionModelWidget = parent.parent
7370

74-
self.selection_model = selection_model
71+
self.selection_model = self.parent.selection_model
7572

7673
self.model = FAverageModel(
7774
parent=None,

0 commit comments

Comments
 (0)