update ruff version (#30932)

* update ruff version

* fix research projects

* Empty

* Fix errors

---------

Co-authored-by: Lysandre <lysandre@huggingface.co>
This commit is contained in:
Arthur
2024-05-22 06:40:15 +02:00
committed by GitHub
parent 60bb571e99
commit 673440d073
1172 changed files with 1555 additions and 1861 deletions

View File

@@ -12,8 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""" Testing suite for the PyTorch CANINE model. """
"""Testing suite for the PyTorch CANINE model."""
import unittest
from typing import List, Tuple

View File

@@ -98,7 +98,7 @@ class CanineTokenizationTest(TokenizerTesterMixin, unittest.TestCase):
# Isolate this from the other tests because we save additional tokens/etc
tmpdirname = tempfile.mkdtemp()
sample_text = " He is very happy, UNwant\u00E9d,running"
sample_text = " He is very happy, UNwant\u00e9d,running"
before_tokens = tokenizer.encode(sample_text, add_special_tokens=False)
tokenizer.save_pretrained(tmpdirname)
@@ -114,7 +114,7 @@ class CanineTokenizationTest(TokenizerTesterMixin, unittest.TestCase):
# Isolate this from the other tests because we save additional tokens/etc
tmpdirname = tempfile.mkdtemp()
sample_text = " He is very happy, UNwant\u00E9d,running"
sample_text = " He is very happy, UNwant\u00e9d,running"
additional_special_tokens = tokenizer.additional_special_tokens