Update quality tooling for formatting (#21480)
* Result of black 23.1 * Update target to Python 3.7 * Switch flake8 to ruff * Configure isort * Configure isort * Apply isort with line limit * Put the right black version * adapt black in check copies * Fix copies
This commit is contained in:
@@ -26,8 +26,8 @@ import unittest
|
||||
import numpy as np
|
||||
import pytest
|
||||
from datasets import load_dataset
|
||||
|
||||
from huggingface_hub import snapshot_download
|
||||
|
||||
from transformers import Wav2Vec2Config, is_tf_available
|
||||
from transformers.testing_utils import (
|
||||
CaptureLogger,
|
||||
@@ -53,6 +53,7 @@ if is_tf_available():
|
||||
|
||||
if is_pyctcdecode_available():
|
||||
import pyctcdecode.decoder
|
||||
|
||||
from transformers import Wav2Vec2ProcessorWithLM
|
||||
from transformers.models.wav2vec2_with_lm import processing_wav2vec2_with_lm
|
||||
|
||||
@@ -62,7 +63,6 @@ if is_librosa_available():
|
||||
|
||||
|
||||
def _test_wav2vec2_with_lm_invalid_pool(in_queue, out_queue, timeout):
|
||||
|
||||
error = None
|
||||
try:
|
||||
_ = in_queue.get(timeout=timeout)
|
||||
@@ -283,7 +283,6 @@ class TFWav2Vec2ModelTester:
|
||||
|
||||
@require_tf
|
||||
class TFWav2Vec2ModelTest(TFModelTesterMixin, unittest.TestCase):
|
||||
|
||||
all_model_classes = (TFWav2Vec2Model, TFWav2Vec2ForCTC) if is_tf_available() else ()
|
||||
test_resize_embeddings = False
|
||||
test_head_masking = False
|
||||
|
||||
Reference in New Issue
Block a user