Auto-format code with black (#10106)

Co-authored-by: explosion-bot <explosion-bot@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2022-01-21 10:01:10 +01:00 committed by GitHub
parent 34ed93ef68
commit 6d4db5c3c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions

View File

@ -699,9 +699,7 @@ def _get_examples_without_label(data: Sequence[Example], label: str) -> int:
return count return count
def _get_labels_from_model( def _get_labels_from_model(nlp: Language, factory_name: str) -> Set[str]:
nlp: Language, factory_name: str
) -> Set[str]:
pipe_names = [ pipe_names = [
pipe_name pipe_name
for pipe_name in nlp.pipe_names for pipe_name in nlp.pipe_names
@ -714,9 +712,7 @@ def _get_labels_from_model(
return labels return labels
def _get_labels_from_spancat( def _get_labels_from_spancat(nlp: Language) -> Dict[str, Set[str]]:
nlp: Language
) -> Dict[str, Set[str]]:
pipe_names = [ pipe_names = [
pipe_name pipe_name
for pipe_name in nlp.pipe_names for pipe_name in nlp.pipe_names

View File

@ -79,7 +79,8 @@ def test_explicit_labels():
nlp.initialize() nlp.initialize()
assert spancat.labels == ("PERSON", "LOC") assert spancat.labels == ("PERSON", "LOC")
#TODO figure out why this is flaky
# TODO figure out why this is flaky
@pytest.mark.skip(reason="Test is unreliable for unknown reason") @pytest.mark.skip(reason="Test is unreliable for unknown reason")
def test_doc_gc(): def test_doc_gc():
# If the Doc object is garbage collected, the spans won't be functional afterwards # If the Doc object is garbage collected, the spans won't be functional afterwards