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:
@@ -21,8 +21,8 @@ import tempfile
|
||||
import unittest
|
||||
|
||||
import numpy as np
|
||||
|
||||
import requests
|
||||
|
||||
from transformers import AltCLIPConfig, AltCLIPProcessor, AltCLIPTextConfig, AltCLIPVisionConfig
|
||||
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
|
||||
from transformers.utils import is_torch_available, is_vision_available
|
||||
@@ -292,7 +292,6 @@ class AltCLIPTextModelTester:
|
||||
|
||||
@require_torch
|
||||
class AltCLIPTextModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
|
||||
all_model_classes = (AltCLIPTextModel,) if is_torch_available() else ()
|
||||
fx_compatible = True
|
||||
test_pruning = False
|
||||
@@ -343,7 +342,6 @@ class AltCLIPTextModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
|
||||
class AltCLIPModelTester:
|
||||
def __init__(self, parent, text_kwargs=None, vision_kwargs=None, is_training=True):
|
||||
|
||||
if text_kwargs is None:
|
||||
text_kwargs = {}
|
||||
if vision_kwargs is None:
|
||||
@@ -395,7 +393,6 @@ def prepare_img():
|
||||
|
||||
@require_torch
|
||||
class AltCLIPModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
|
||||
all_model_classes = (AltCLIPModel,) if is_torch_available() else ()
|
||||
fx_compatible = True
|
||||
test_head_masking = False
|
||||
|
||||
Reference in New Issue
Block a user