We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d6deb37 + 58d0cbc commit a94df37Copy full SHA for a94df37
utils/incrparse/validate_parse.py
@@ -4,6 +4,7 @@
4
5
import argparse
6
import difflib
7
+import io
8
import os
9
import sys
10
@@ -108,8 +109,10 @@ def main():
108
109
sys.exit(1)
110
111
# Check if the two syntax trees are the same
- lines = difflib.unified_diff(open(incremental_serialized_file).readlines(),
112
- open(post_edit_serialized_file).readlines(),
+ lines = difflib.unified_diff(io.open(incremental_serialized_file, 'r',
113
+ encoding='utf-8', errors='ignore').readlines(),
114
+ io.open(post_edit_serialized_file, 'r',
115
116
fromfile=incremental_serialized_file,
117
tofile=post_edit_serialized_file)
118
diff = '\n'.join(line for line in lines)
0 commit comments