mirror of https://gitlab.com/pamhyr/pamhyr2
pep8
parent
230712c3ea
commit
c5f918c885
|
|
@ -46,7 +46,9 @@ class Results(object):
|
||||||
el.split("/")[-1][0:-4]
|
el.split("/")[-1][0:-4]
|
||||||
for el in glob.glob(repertory_results + "/*.bin")
|
for el in glob.glob(repertory_results + "/*.bin")
|
||||||
]
|
]
|
||||||
self._pollutants_list.insert(0, self._pollutants_list.pop(self._pollutants_list.index("total_sediment")))
|
self._pollutants_list.insert(0, self._pollutants_list.pop(
|
||||||
|
self._pollutants_list.index("total_sediment"))
|
||||||
|
)
|
||||||
|
|
||||||
self._phys_var_list = ["C", "G", "M", "D", "L", "N", "R"]
|
self._phys_var_list = ["C", "G", "M", "D", "L", "N", "R"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -429,9 +429,6 @@ class AdisTSwc(AdisTS):
|
||||||
list_characteristics = ["type", "diametre", "rho", "porosity",
|
list_characteristics = ["type", "diametre", "rho", "porosity",
|
||||||
"cdc_riv", "cdc_cas", "apd", "ac", "bc"]
|
"cdc_riv", "cdc_cas", "apd", "ac", "bc"]
|
||||||
|
|
||||||
print("pol_data:")
|
|
||||||
print(pol_data[0])
|
|
||||||
|
|
||||||
if len(list_characteristics) <= (len(pol_data[0])):
|
if len(list_characteristics) <= (len(pol_data[0])):
|
||||||
for i in range(len(list_characteristics)):
|
for i in range(len(list_characteristics)):
|
||||||
f.write(f"{list_characteristics[i]} = {pol_data[0][i]}\n")
|
f.write(f"{list_characteristics[i]} = {pol_data[0][i]}\n")
|
||||||
|
|
|
||||||
|
|
@ -189,7 +189,8 @@ class TableModel(PamhyrTableModel):
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
pol = next(filter(lambda x: x.name == value,
|
pol = next(filter(lambda x: x.name == value,
|
||||||
self._data._Pollutants.Pollutants_List))
|
self._data._Pollutants.Pollutants_List)
|
||||||
|
)
|
||||||
self._undo.push(
|
self._undo.push(
|
||||||
SetPolCommand(
|
SetPolCommand(
|
||||||
self._lst, row, pol.id
|
self._lst, row, pol.id
|
||||||
|
|
|
||||||
|
|
@ -91,12 +91,12 @@ class TableModel(PamhyrTableModel):
|
||||||
self.layoutAboutToBeChanged.emit()
|
self.layoutAboutToBeChanged.emit()
|
||||||
|
|
||||||
self._undo.push(PasteCommand(self._data, row,
|
self._undo.push(PasteCommand(self._data, row,
|
||||||
list(
|
list(
|
||||||
map(
|
map(
|
||||||
lambda d: self._data.new_from_data(d),
|
lambda d: self._data.new_from_data(d),
|
||||||
data
|
data
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue