Skip to content

Commit 255850d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8f21be5 commit 255850d

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

src/iminuit/_repr_html.py

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,17 +188,23 @@ def params(mps):
188188
if mp.upper_limit is not None and (mp.value + mp.error) > mp.upper_limit:
189189
name_style = warn_style
190190
limit_upper_style = warn_style
191-
191+
192192
if me: # me is mp.merror, which should have .lower and .upper attributes
193193
# Check if Minos lower error goes below the parameter's lower limit
194-
if mp.lower_limit is not None and hasattr(me, 'lower') and \
195-
(mp.value + me.lower) < mp.lower_limit:
194+
if (
195+
mp.lower_limit is not None
196+
and hasattr(me, "lower")
197+
and (mp.value + me.lower) < mp.lower_limit
198+
):
196199
name_style = warn_style
197200
limit_lower_style = warn_style
198-
201+
199202
# Check if Minos upper error goes above the parameter's upper limit
200-
if mp.upper_limit is not None and hasattr(me, 'upper') and \
201-
(mp.value + me.upper) > mp.upper_limit:
203+
if (
204+
mp.upper_limit is not None
205+
and hasattr(me, "upper")
206+
and (mp.value + me.upper) > mp.upper_limit
207+
):
202208
name_style = warn_style
203209
limit_upper_style = warn_style
204210

@@ -210,8 +216,14 @@ def params(mps):
210216
td(e), # Hesse error - no style from limits
211217
td(mem), # Minos Error- - no style from limits
212218
td(mep), # Minos Error+ - no style from limits
213-
td("%.3G" % mp.lower_limit if mp.lower_limit is not None else "", style=limit_lower_style),
214-
td("%.3G" % mp.upper_limit if mp.upper_limit is not None else "", style=limit_upper_style),
219+
td(
220+
"%.3G" % mp.lower_limit if mp.lower_limit is not None else "",
221+
style=limit_lower_style,
222+
),
223+
td(
224+
"%.3G" % mp.upper_limit if mp.upper_limit is not None else "",
225+
style=limit_upper_style,
226+
),
215227
td("yes" if mp.is_fixed else ("CONST" if mp.is_const else "")),
216228
)
217229
)

0 commit comments

Comments
 (0)