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:
@@ -110,7 +110,6 @@ class BlipImageProcessingTester(unittest.TestCase):
|
||||
@require_torch
|
||||
@require_vision
|
||||
class BlipImageProcessingTest(ImageProcessingSavingTestMixin, unittest.TestCase):
|
||||
|
||||
image_processing_class = BlipImageProcessor if is_vision_available() else None
|
||||
|
||||
def setUp(self):
|
||||
@@ -232,7 +231,6 @@ class BlipImageProcessingTest(ImageProcessingSavingTestMixin, unittest.TestCase)
|
||||
@require_torch
|
||||
@require_vision
|
||||
class BlipImageProcessingTestFourChannels(ImageProcessingSavingTestMixin, unittest.TestCase):
|
||||
|
||||
image_processing_class = BlipImageProcessor if is_vision_available() else None
|
||||
|
||||
def setUp(self):
|
||||
|
||||
@@ -21,8 +21,8 @@ import tempfile
|
||||
import unittest
|
||||
|
||||
import numpy as np
|
||||
|
||||
import requests
|
||||
|
||||
from transformers import BlipConfig, BlipTextConfig, BlipVisionConfig
|
||||
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
|
||||
from transformers.utils import is_torch_available, is_vision_available
|
||||
@@ -301,7 +301,6 @@ class BlipTextModelTester:
|
||||
|
||||
@require_torch
|
||||
class BlipTextModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
|
||||
all_model_classes = (BlipTextModel,) if is_torch_available() else ()
|
||||
fx_compatible = False
|
||||
test_pruning = False
|
||||
@@ -345,7 +344,6 @@ class BlipTextModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
|
||||
class BlipModelTester:
|
||||
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:
|
||||
@@ -523,7 +521,6 @@ class BlipModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
|
||||
class BlipTextRetrievalModelTester:
|
||||
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:
|
||||
@@ -571,7 +568,6 @@ class BlipTextRetrievalModelTester:
|
||||
|
||||
class BlipTextImageModelsModelTester:
|
||||
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:
|
||||
|
||||
@@ -125,7 +125,6 @@ class BlipTextModelTester:
|
||||
|
||||
@require_torch
|
||||
class BlipTextModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
|
||||
all_model_classes = (BlipTextModel,) if is_torch_available() else ()
|
||||
fx_compatible = False
|
||||
test_pruning = False
|
||||
|
||||
Reference in New Issue
Block a user