mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 10:16:27 +03:00
Auto-format code with black (#10106)
Co-authored-by: explosion-bot <explosion-bot@users.noreply.github.com>
This commit is contained in:
parent
34ed93ef68
commit
6d4db5c3c7
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user