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:
@@ -35,6 +35,7 @@ from typing import Iterator, List, Optional, Union
|
||||
from unittest import mock
|
||||
|
||||
import huggingface_hub
|
||||
|
||||
from transformers import logging as transformers_logging
|
||||
|
||||
from .deepspeed import is_deepspeed_available
|
||||
@@ -778,6 +779,7 @@ def get_tests_dir(append_path=None):
|
||||
# The original code came from:
|
||||
# https://github.com/fastai/fastai/blob/master/tests/utils/text.py
|
||||
|
||||
|
||||
# When any function contains print() calls that get overwritten, like progress bars,
|
||||
# a special care needs to be applied, since under pytest -s captured output (capsys
|
||||
# or contextlib.redirect_stdout) contains any temporary printed strings, followed by
|
||||
|
||||
Reference in New Issue
Block a user