Skip to content

Commit dc8e5e4

Browse files
committed
Reformat files, fix pre-commit errors
1 parent b89df56 commit dc8e5e4

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

envergo/moulinette/regulations/ep.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,9 +821,7 @@ def get_result_code(self, result_data):
821821
result = "derogation_inventaire"
822822
# 6. Per-hedge evaluation — pick the most constraining
823823
else:
824-
result = max(
825-
per_hedge_results.values(), key=lambda r: EP_RU_RESULT_RANK[r]
826-
)
824+
result = max(per_hedge_results.values(), key=lambda r: EP_RU_RESULT_RANK[r])
827825

828826
return result
829827

envergo/moulinette/tests/test_ep_regime_unique.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ def _build_moulinette(hedges, density, hedge_data=None):
8888
of dicts from make_hedge). Exactly one must be provided.
8989
"""
9090
data = make_moulinette_haie_data(
91-
hedges=hedges, hedge_data=hedge_data, reimplantation="replantation",
91+
hedges=hedges,
92+
hedge_data=hedge_data,
93+
reimplantation="replantation",
9294
)
9395
with patch(DENSITY_PATCH, return_value=_make_density_return(density)):
9496
moulinette = MoulinetteHaie(data)

envergo/templates/haie/moulinette/debug/density_around_lines.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<h6>Densité bocagère (400 m)</h6>
22

3-
<p><strong>Densité :</strong> {{ density_400|floatformat:"1" }} ml/ha</p>
3+
<p>
4+
<strong>Densité :</strong> {{ density_400|floatformat:"1" }} ml/ha
5+
</p>
46

57
{% if pre_computed_density_400 %}
68
<p>

envergo/templates/haie/moulinette/debug/ep_regime_unique.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h6>Détail par haie</h6>
3232
<tr>
3333
<td>{{ row.id }}</td>
3434
<td>{{ row.hedge_type }}</td>
35-
<td>{% if row.in_zone_sensible %}Oui{% else %}Non{% endif %}</td>
35+
<td>{{ row.in_zone_sensible|yesno:"Oui,Non" }}</td>
3636
<td>{{ row.partial_result }}</td>
3737
</tr>
3838
{% endfor %}

0 commit comments

Comments
 (0)