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:
@@ -114,7 +114,6 @@ class ChineseCLIPImageProcessingTester(unittest.TestCase):
|
||||
@require_torch
|
||||
@require_vision
|
||||
class ChineseCLIPImageProcessingTest(ImageProcessingSavingTestMixin, unittest.TestCase):
|
||||
|
||||
image_processing_class = ChineseCLIPImageProcessor if is_vision_available() else None
|
||||
|
||||
def setUp(self):
|
||||
@@ -247,7 +246,6 @@ class ChineseCLIPImageProcessingTest(ImageProcessingSavingTestMixin, unittest.Te
|
||||
@require_torch
|
||||
@require_vision
|
||||
class ChineseCLIPImageProcessingTestFourChannels(ImageProcessingSavingTestMixin, unittest.TestCase):
|
||||
|
||||
image_processing_class = ChineseCLIPImageProcessor if is_vision_available() else None
|
||||
|
||||
def setUp(self):
|
||||
|
||||
@@ -20,8 +20,8 @@ import tempfile
|
||||
import unittest
|
||||
|
||||
import numpy as np
|
||||
|
||||
import requests
|
||||
|
||||
from transformers import ChineseCLIPConfig, ChineseCLIPTextConfig, ChineseCLIPVisionConfig
|
||||
from transformers.models.auto import get_values
|
||||
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
|
||||
@@ -316,7 +316,6 @@ class ChineseCLIPVisionModelTester:
|
||||
|
||||
@require_torch
|
||||
class ChineseCLIPTextModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
|
||||
all_model_classes = (ChineseCLIPTextModel,) if is_torch_available() else ()
|
||||
fx_compatible = False
|
||||
|
||||
@@ -478,7 +477,6 @@ class ChineseCLIPVisionModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
|
||||
class ChineseCLIPModelTester:
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user