Apply ruff formatting to 8 files

This commit is contained in:
Matthew Honnibal
2026-03-21 08:43:52 +01:00
parent 47b5504e90
commit 8e6bd6d1c5
8 changed files with 3 additions and 13 deletions
+3 -1
View File
@@ -207,7 +207,9 @@ def find_threshold(
),
)
if hasattr(pipe, "cfg"):
nlp.get_pipe(pipe_name).cfg = set_nested_item(pipe.cfg, config_keys, threshold)
nlp.get_pipe(pipe_name).cfg = set_nested_item(
pipe.cfg, config_keys, threshold
)
eval_scores = nlp.evaluate(dev_dataset)
if scores_key not in eval_scores:
-1
View File
@@ -1,7 +1,6 @@
from thinc.api import Model, normal_init
def PrecomputableAffine(nO, nI, nF, nP, dropout=0.1):
model = Model(
"precomputable_affine",
-1
View File
@@ -4,7 +4,6 @@ from thinc.api import Model, to_numpy
from thinc.types import Ints1d, Ragged
def extract_spans() -> Model[Tuple[Ragged, Ragged], Ragged]:
"""Extract spans from a sequence of source arrays, as specified by an array
of (start, end) indices. The output is a ragged array of the
-2
View File
@@ -1,5 +1,3 @@
def test_bg_tokenizer_handles_final_diacritics(bg_tokenizer):
text = "Ня̀маше яйца̀. Ня̀маше яйца̀."
tokens = bg_tokenizer(text)
-2
View File
@@ -1,5 +1,3 @@
def test_la_tokenizer_handles_exc_in_text(la_tokenizer):
text = "scio te omnia facturum, ut nobiscum quam primum sis"
tokens = la_tokenizer(text)
-2
View File
@@ -1,5 +1,3 @@
def test_long_text(sl_tokenizer):
# Excerpt: European Convention on Human Rights
text = """
-2
View File
@@ -1,5 +1,3 @@
def test_long_text(sq_tokenizer):
# Excerpt: European Convention on Human Rights
text = """
-2
View File
@@ -1,5 +1,3 @@
def test_long_text(xx_tokenizer):
# Excerpt: Text in Skolt Sami taken from https://www.samediggi.fi
text = """