system HF staff commited on
Commit
61ba2cd
1 Parent(s): 9a052ac

Update files from the datasets library (from 1.16.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.16.0

Files changed (1) hide show
  1. blog_authorship_corpus.py +2 -2
blog_authorship_corpus.py CHANGED
@@ -122,8 +122,8 @@ class BlogAuthorshipCorpus(datasets.GeneratorBasedBuilder):
122
  date = parse_date(line)
123
  elif line != "" and not line.startswith("<"):
124
  if date == "":
125
- logger.warning("Date missing for {} in {}".format(line, file_name))
126
- assert date is not None, "Date is missing before {}".format(line)
127
  yield key, {
128
  "text": line,
129
  "date": date,
 
122
  date = parse_date(line)
123
  elif line != "" and not line.startswith("<"):
124
  if date == "":
125
+ logger.warning(f"Date missing for {line} in {file_name}")
126
+ assert date is not None, f"Date is missing before {line}"
127
  yield key, {
128
  "text": line,
129
  "date": date,