Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 001c9a2

Browse filesBrowse files
committed
remove clean_float which is not necessary
1 parent 2a7d214 commit 001c9a2
Copy full SHA for 001c9a2

File tree

Expand file treeCollapse file tree

1 file changed

+1
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-6
lines changed

‎test/percy/compare-pandas.py

Copy file name to clipboardExpand all lines: test/percy/compare-pandas.py
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,11 @@
55
os.chdir(os.path.dirname(__file__))
66

77

8-
def clean_float(numstr):
9-
# round numbers to 3 digits, to remove floating-point differences
10-
return round(float(numstr), 3)
11-
12-
138
def get_fig(html):
149
# strip off all the rest of the html and js
1510
fig_str = html[html.index("[{", html.rindex("Plotly.newPlot(")) :]
1611
fig_str = fig_str[: fig_str.index("} ") + 1]
17-
data, layout, config = json.loads(f"[{fig_str}]", parse_float=clean_float)
12+
data, layout, config = json.loads(f"[{fig_str}]")
1813
fig_dict = dict(data=data, layout=layout, config=config)
1914
return json.dumps(fig_dict, indent=2).splitlines(keepends=True)
2015

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.