mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pep8: Fixes code style.
This commit is contained in:
1 parent
2736d2f399
commit
c3cae35de4
4 files changed
+56
-29
No files matched your search
+20
-15
@@ -441,18 +441,18 @@ class Mage(CommandLineSolver):
|
||||
files = []
|
||||
|
||||
sin_dict = {
|
||||
"ND":"*",
|
||||
"S1":"D",
|
||||
"S2":"T",
|
||||
"S3":"T",
|
||||
"OR":"D",
|
||||
"OC":"B",
|
||||
"OV":"F",
|
||||
"V1":"V",
|
||||
"V2":"W",
|
||||
"BO":"A",
|
||||
"UD":"X",
|
||||
"PO":"P",
|
||||
"ND": "*",
|
||||
"S1": "D",
|
||||
"S2": "T",
|
||||
"S3": "T",
|
||||
"OR": "D",
|
||||
"OC": "B",
|
||||
"OV": "F",
|
||||
"V1": "V",
|
||||
"V2": "W",
|
||||
"BO": "A",
|
||||
"UD": "X",
|
||||
"PO": "P",
|
||||
}
|
||||
|
||||
hydraulic_structures = study.river.hydraulic_structures.lst
|
||||
@@ -467,16 +467,21 @@ class Mage(CommandLineSolver):
|
||||
|
||||
for hs in hydraulic_structures:
|
||||
if hs.input_reach.is_enable:
|
||||
f.write('* ouvrage au pk ' +f"{hs.input_kp:>12.1f}"+ ' ' + hs.name + '\n')
|
||||
for bhs in hs.basic_structures:
|
||||
reach_id = study.river.get_edge_id(hs.input_reach)+1
|
||||
f.write(
|
||||
'* ouvrage au pk ' +
|
||||
f"{hs.input_kp:>12.1f}" + ' ' +
|
||||
hs.name + '\n'
|
||||
)
|
||||
|
||||
for bhs in hs.basic_structures:
|
||||
reach_id = study.river.get_edge_id(hs.input_reach) + 1
|
||||
param_str = ' '.join(
|
||||
[
|
||||
f'{p.value:>10.3f}'
|
||||
for p in bhs._data
|
||||
]
|
||||
)
|
||||
|
||||
f.write(
|
||||
f"{sin_dict[bhs.type]} " +
|
||||
f"{reach_id} {hs.input_kp:>12.3f} {param_str} " +
|
||||
|
||||
Reference in new issue
Block a user