mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-09 22:54:53 +03:00
black formatting
This commit is contained in:
parent
e42079a4bd
commit
6a6c001cf7
|
@ -1738,9 +1738,7 @@ def all_equal(iterable):
|
||||||
|
|
||||||
|
|
||||||
def require_annotation(
|
def require_annotation(
|
||||||
annotations: Sequence[Union[str, int]],
|
annotations: Sequence[Union[str, int]], *, require_complete: Sequence[bool] = None
|
||||||
*,
|
|
||||||
require_complete: Sequence[bool] = None
|
|
||||||
) -> Callable:
|
) -> Callable:
|
||||||
"""
|
"""
|
||||||
To be used as a decorator for functions whose first argument
|
To be used as a decorator for functions whose first argument
|
||||||
|
@ -1788,7 +1786,9 @@ def require_annotation(
|
||||||
msg += " (complete)"
|
msg += " (complete)"
|
||||||
else:
|
else:
|
||||||
msg = ""
|
msg = ""
|
||||||
for i, (attr, complete) in enumerate(zip(annotations, require_complete)):
|
for i, (attr, complete) in enumerate(
|
||||||
|
zip(annotations, require_complete)
|
||||||
|
):
|
||||||
if i != 0:
|
if i != 0:
|
||||||
msg += " "
|
msg += " "
|
||||||
msg += str(attr)
|
msg += str(attr)
|
||||||
|
@ -1803,5 +1803,7 @@ def require_annotation(
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return func(doclike, *args, **kwargs)
|
return func(doclike, *args, **kwargs)
|
||||||
|
|
||||||
return func_with_require
|
return func_with_require
|
||||||
|
|
||||||
return require_annotation_decorator
|
return require_annotation_decorator
|
||||||
|
|
Loading…
Reference in New Issue
Block a user