Update ruff to 0.11.2 (#36962)
* update * update * update --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -145,9 +145,9 @@ class DataTrainingArguments:
|
||||
train_extension = self.train_file.split(".")[-1]
|
||||
assert train_extension in ["csv", "json"], "`train_file` should be a csv or a json file."
|
||||
validation_extension = self.validation_file.split(".")[-1]
|
||||
assert (
|
||||
validation_extension == train_extension
|
||||
), "`validation_file` should have the same extension (csv or json) as `train_file`."
|
||||
assert validation_extension == train_extension, (
|
||||
"`validation_file` should have the same extension (csv or json) as `train_file`."
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -265,9 +265,9 @@ def main():
|
||||
if data_args.test_file is not None:
|
||||
train_extension = data_args.train_file.split(".")[-1]
|
||||
test_extension = data_args.test_file.split(".")[-1]
|
||||
assert (
|
||||
test_extension == train_extension
|
||||
), "`test_file` should have the same extension (csv or json) as `train_file`."
|
||||
assert test_extension == train_extension, (
|
||||
"`test_file` should have the same extension (csv or json) as `train_file`."
|
||||
)
|
||||
data_files["test"] = data_args.test_file
|
||||
else:
|
||||
raise ValueError("Need either a GLUE task or a test file for `do_predict`.")
|
||||
|
||||
Reference in New Issue
Block a user