Migrate linter from pylint to ruff (#1665)

This commit is contained in:
Simon Mo
2023-11-20 11:58:01 -08:00
committed by GitHub
parent 112627e8b2
commit 5ffc0d13a2
45 changed files with 122 additions and 607 deletions

View File

@ -17,9 +17,8 @@ def sample_requests(
tokenizer: PreTrainedTokenizerBase,
fixed_output_len: Optional[int],
) -> List[Tuple[str, int, int]]:
if fixed_output_len is not None:
if fixed_output_len < 4:
raise ValueError("output_len too small")
if fixed_output_len is not None and fixed_output_len < 4:
raise ValueError("output_len too small")
# Load the dataset.
with open(dataset_path) as f: