Auto-format code with black (#12019)

Co-authored-by: explosion-bot <explosion-bot@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2022-12-23 12:44:07 +01:00 committed by GitHub
parent 64d2d27c5d
commit 90896504a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -53,9 +53,7 @@ def _stream_jsonl(path: Path, field: str) -> Iterable[str]:
""" """
for entry in srsly.read_jsonl(path): for entry in srsly.read_jsonl(path):
if field not in entry: if field not in entry:
msg.fail( msg.fail(f"{path} does not contain the required '{field}' field.", exits=1)
f"{path} does not contain the required '{field}' field.", exits=1
)
else: else:
yield entry[field] yield entry[field]
@ -118,8 +116,10 @@ def apply(
paths = walk_directory(data_path) paths = walk_directory(data_path)
if len(paths) == 0: if len(paths) == 0:
docbin.to_disk(output_file) docbin.to_disk(output_file)
msg.warn("Did not find data to process," msg.warn(
f" {data_path} seems to be an empty directory.") "Did not find data to process,"
f" {data_path} seems to be an empty directory."
)
return return
nlp = load_model(model) nlp = load_model(model)
msg.good(f"Loaded model {model}") msg.good(f"Loaded model {model}")