+15
-15
lines changedFilter options
+15
-15
lines changed Original file line number Diff line number Diff line change
@@ -120,16 +120,18 @@ def anchor_id(self) -> Optional[str]:
120
120
121
121
def fmt(self) -> str:
122
122
# TODO: render in template
123
-
style = self._styles.get(self.alert_type.name.lower(), 'secondary')
124
-
hint = ''
123
+
style = self._styles.get(self.alert_type.name.lower(), "secondary")
124
+
hint = ""
125
125
126
126
if self.alert_type == AlertType.HIGH_CORRELATION and self.values is not None:
127
127
num = len(self.values["fields"])
128
128
title = ", ".join(self.values["fields"])
129
129
corr = self.values["corr"]
130
130
hint = f'data-bs-toggle="tooltip" data-bs-placement="right" data-bs-title="This variable has a high {corr} correlation with {num} fields: {title}"'
131
131
132
-
return f'<span class="badge text-bg-{style}" {hint}>{self.alert_type_name}</span>'
132
+
return (
133
+
f'<span class="badge text-bg-{style}" {hint}>{self.alert_type_name}</span>'
134
+
)
133
135
134
136
def _get_description(self) -> str:
135
137
"""Return a human level description of the alert.
Original file line number Diff line number Diff line change
@@ -139,9 +139,7 @@ def __init__(
139
139
if len(kwargs) > 0:
140
140
shorthands, kwargs = Config.shorthands(kwargs)
141
141
report_config = report_config.update(
142
-
Settings()
143
-
.update(shorthands)
144
-
.dict(exclude_defaults=True)
142
+
Settings().update(shorthands).dict(exclude_defaults=True)
145
143
)
146
144
147
145
if kwargs:
Original file line number Diff line number Diff line change
@@ -336,4 +336,8 @@ def help(title: str, url: Optional[str] = None) -> str:
336
336
337
337
@list_args
338
338
def fmt_badge(value: str) -> str:
339
-
return re.sub(r"\((\d+)\)", r'<span class="badge text-bg-secondary align-text-top">\1</span>', value)
339
+
return re.sub(
340
+
r"\((\d+)\)",
341
+
r'<span class="badge text-bg-secondary align-text-top">\1</span>',
342
+
value,
343
+
)
Original file line number Diff line number Diff line change
@@ -31,8 +31,8 @@ def render(self) -> widgets.GridBox:
31
31
)
32
32
33
33
style_name = styles[type_name]
34
-
if style_name not in ('primary', 'success', 'info', 'warning', 'danger'):
35
-
style_name = ''
34
+
if style_name not in ("primary", "success", "info", "warning", "danger"):
35
+
style_name = ""
36
36
37
37
items.append(
38
38
Button(
Original file line number Diff line number Diff line change
@@ -43,18 +43,14 @@ def test_timeseries_identification(html_profile: str):
43
43
44
44
45
45
def test_timeseries_autocorrelation_tab(html_profile: str):
46
-
assert (
47
-
">Autocorrelation<" in html_profile
48
-
), "TimeSeries not detected"
46
+
assert ">Autocorrelation<" in html_profile, "TimeSeries not detected"
49
47
assert (
50
48
html_profile.count(">Autocorrelation<") == 8
51
49
), "TimeSeries autocorrelation tabs incorrectly generated"
52
50
53
51
54
52
def test_timeseries_seasonality(html_profile: str):
55
-
assert (
56
-
">Seasonal<" in html_profile
57
-
), "Seasonality incorrectly identified"
53
+
assert ">Seasonal<" in html_profile, "Seasonality incorrectly identified"
58
54
assert (
59
55
html_profile.count(">Seasonal<") == 4
60
56
), "Seasonality warning incorrectly identified"
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4