77
88import numpy as np
99import pandas as pd
10+ from pandas .io .pytables import DataCol
1011import pyqtgraph as pg
1112import pyqtgraph .exporters
1213from PySide6 .QtCore import Qt
@@ -55,8 +56,8 @@ def __init__(self, parent: "MainWindow"):
5556 self .plot_widgets = [self .conc_graph , self .perc_graph , self .titration_graph ]
5657 self .legends = []
5758
58- self .font_size = 10
59- self .line_width = 2
59+ self .font_size : int = 10
60+ self .line_width : int = 2
6061
6162 self .componentComboBox .currentTextChanged .connect (self ._updateTitrationCurve )
6263 self .componentComboBox_perc .currentTextChanged .connect (
@@ -77,10 +78,10 @@ def __init__(self, parent: "MainWindow"):
7778 self .is_distribution_result = parent .dmode .currentIndex () == 1
7879 self .is_optimization_result = parent .dmode .currentIndex () == 2
7980
80- self .soluble_result = resultToDataList (parent .result ["species_concentrations" ])
81- self .perc_result = resultToDataList (parent .result ["soluble_percentages" ])
81+ self .soluble_result : list [ pd . DataFrame ] = resultToDataList (parent .result ["species_concentrations" ])
82+ self .perc_result : list [ pd . DataFrame ] = resultToDataList (parent .result ["soluble_percentages" ])
8283
83- self .solids_result = [
84+ self .solids_result : list [ pd . DataFrame ] = [
8485 d [
8586 [
8687 column
@@ -90,14 +91,14 @@ def __init__(self, parent: "MainWindow"):
9091 ]
9192 for d in resultToDataList (parent .result ["solids_concentrations" ])
9293 ]
93- self .solid_perc_result = resultToDataList (parent .result ["solids_percentages" ])
94+ self .solid_perc_result : list [ pd . DataFrame ] = resultToDataList (parent .result ["solids_percentages" ])
9495
95- self .with_solids = not self .solids_result [0 ].empty
96- self .with_errors = parent .uncertaintyMode .isChecked ()
96+ self .with_solids : bool = not self .solids_result [0 ].empty
97+ self .with_errors : bool = parent .uncertaintyMode .isChecked ()
9798
9899 if self .with_errors :
99- self .soluble_sd = resultToDataList (parent .result ["species_sigma" ])
100- self .soluble_sd_perc = resultToDataList (
100+ self .soluble_sd : list [ pd . DataFrame ] = resultToDataList (parent .result ["species_sigma" ])
101+ self .soluble_sd_perc : list [ pd . DataFrame ] = resultToDataList (
101102 parent .result ["soluble_percentages_sigma" ]
102103 )
103104
0 commit comments