Fix linting [ci skip]

This commit is contained in:
Ines Montani 2020-07-31 17:05:28 +02:00
parent e9e8fa2466
commit 2d955fbf98

View File

@ -1141,9 +1141,9 @@ class Language:
start_time = timer() start_time = timer()
# tokenize the texts only for timing purposes # tokenize the texts only for timing purposes
if not hasattr(self.tokenizer, "pipe"): if not hasattr(self.tokenizer, "pipe"):
_ = [self.tokenizer(text) for text in texts] _ = [self.tokenizer(text) for text in texts] # noqa: F841
else: else:
_ = list(self.tokenizer.pipe(texts)) _ = list(self.tokenizer.pipe(texts)) # noqa: F841
for name, pipe in self.pipeline: for name, pipe in self.pipeline:
kwargs = component_cfg.get(name, {}) kwargs = component_cfg.get(name, {})
kwargs.setdefault("batch_size", batch_size) kwargs.setdefault("batch_size", batch_size)