Skip to content

Commit b401638

Browse files
committed
Revert "have diffable ignore output of value_counts()"
This reverts commit 2a3c548.
1 parent 2a3c548 commit b401638

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

.vscode/settings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
"editor.formatOnSave": false
77
},
88
"workbench.externalBrowser": "chrome",
9-
"editor.formatOnSave": false,
10-
"flake8.enabled": false
9+
"editor.formatOnSave": false
1110
}

extras/lib/diffable.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,11 @@ def has_memory_address(cell: NotebookNode):
2828
)
2929

3030

31-
def is_value_count(source: str):
32-
return ".value_counts(" in source
33-
34-
3531
def should_clear_output(cell: NotebookNode):
36-
"""
37-
Ignore:
38-
- Any system command output, since things like package paths shown in warnings/errors can change between different systems
39-
- HTML output, since it often has generated IDs (from displacy, plotly, etc.) that change with each execution
40-
- `value_counts()` output, since the order of the index seems to differ by machine/OS
41-
"""
42-
32+
"""Ignore any system command output, since things like package paths shown in warnings/errors can change between different systems. Also clear HTML output, since it often has generated IDs (from displacy, plotly, etc.) that change with each execution."""
4333
source = cell["source"]
4434
return (
45-
is_system_command(source)
46-
or has_rich_output(cell)
47-
or has_memory_address(cell)
48-
or is_value_count(source)
35+
is_system_command(source) or has_rich_output(cell) or has_memory_address(cell)
4936
)
5037

5138

0 commit comments

Comments
 (0)