Update ruff to 0.11.2 (#36962)
* update * update * update --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -79,9 +79,11 @@ def format_mrpc(data_dir, path_to_data):
|
||||
for row in ids_fh:
|
||||
dev_ids.append(row.strip().split("\t"))
|
||||
|
||||
with open(mrpc_train_file, encoding="utf8") as data_fh, open(
|
||||
os.path.join(mrpc_dir, "train.tsv"), "w", encoding="utf8"
|
||||
) as train_fh, open(os.path.join(mrpc_dir, "dev.tsv"), "w", encoding="utf8") as dev_fh:
|
||||
with (
|
||||
open(mrpc_train_file, encoding="utf8") as data_fh,
|
||||
open(os.path.join(mrpc_dir, "train.tsv"), "w", encoding="utf8") as train_fh,
|
||||
open(os.path.join(mrpc_dir, "dev.tsv"), "w", encoding="utf8") as dev_fh,
|
||||
):
|
||||
header = data_fh.readline()
|
||||
train_fh.write(header)
|
||||
dev_fh.write(header)
|
||||
@@ -92,9 +94,10 @@ def format_mrpc(data_dir, path_to_data):
|
||||
else:
|
||||
train_fh.write("%s\t%s\t%s\t%s\t%s\n" % (label, id1, id2, s1, s2))
|
||||
|
||||
with open(mrpc_test_file, encoding="utf8") as data_fh, open(
|
||||
os.path.join(mrpc_dir, "test.tsv"), "w", encoding="utf8"
|
||||
) as test_fh:
|
||||
with (
|
||||
open(mrpc_test_file, encoding="utf8") as data_fh,
|
||||
open(os.path.join(mrpc_dir, "test.tsv"), "w", encoding="utf8") as test_fh,
|
||||
):
|
||||
header = data_fh.readline()
|
||||
test_fh.write("index\t#1 ID\t#2 ID\t#1 String\t#2 String\n")
|
||||
for idx, row in enumerate(data_fh):
|
||||
|
||||
Reference in New Issue
Block a user