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:
@@ -196,7 +196,6 @@ class DistilBertModelTester(object):
|
||||
|
||||
@require_torch
|
||||
class DistilBertModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
|
||||
all_model_classes = (
|
||||
(
|
||||
DistilBertModel,
|
||||
@@ -256,7 +255,6 @@ class DistilBertModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
def test_torchscript_device_change(self):
|
||||
config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()
|
||||
for model_class in self.all_model_classes:
|
||||
|
||||
# BertForMultipleChoice behaves incorrectly in JIT environments.
|
||||
if model_class == DistilBertForMultipleChoice:
|
||||
return
|
||||
|
||||
@@ -24,6 +24,7 @@ from ...test_modeling_flax_common import FlaxModelTesterMixin, ids_tensor, rando
|
||||
|
||||
if is_flax_available():
|
||||
import jax.numpy as jnp
|
||||
|
||||
from transformers.models.distilbert.modeling_flax_distilbert import (
|
||||
FlaxDistilBertForMaskedLM,
|
||||
FlaxDistilBertForMultipleChoice,
|
||||
@@ -111,7 +112,6 @@ class FlaxDistilBertModelTester(unittest.TestCase):
|
||||
|
||||
@require_flax
|
||||
class FlaxDistilBertModelTest(FlaxModelTesterMixin, unittest.TestCase):
|
||||
|
||||
all_model_classes = (
|
||||
(
|
||||
FlaxDistilBertModel,
|
||||
|
||||
@@ -170,7 +170,6 @@ class TFDistilBertModelTester:
|
||||
|
||||
@require_tf
|
||||
class TFDistilBertModelTest(TFModelTesterMixin, unittest.TestCase):
|
||||
|
||||
all_model_classes = (
|
||||
(
|
||||
TFDistilBertModel,
|
||||
|
||||
@@ -22,7 +22,6 @@ from ..bert.test_tokenization_bert import BertTokenizationTest
|
||||
|
||||
@require_tokenizers
|
||||
class DistilBertTokenizationTest(BertTokenizationTest):
|
||||
|
||||
tokenizer_class = DistilBertTokenizer
|
||||
rust_tokenizer_class = DistilBertTokenizerFast
|
||||
test_rust_tokenizer = True
|
||||
|
||||
Reference in New Issue
Block a user