No more Tuple, List, Dict (#38797)

* No more Tuple, List, Dict

* make fixup

* More style fixes

* Docstring fixes with regex replacement

* Trigger tests

* Redo fixes after rebase

* Fix copies

* [test all]

* update

* [test all]

* update

* [test all]

* make style after rebase

* Patch the hf_argparser test

* Patch the hf_argparser test

* style fixes

* style fixes

* style fixes

* Fix docstrings in Cohere test

* [test all]

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Matt
2025-06-17 19:37:18 +01:00
committed by GitHub
parent a396f4324b
commit 508a704055
1291 changed files with 14906 additions and 14941 deletions

View File

@@ -37,7 +37,7 @@ python utils/check_dummies.py --fix_and_overwrite
import argparse
import os
import re
from typing import Dict, List, Optional
from typing import Optional
# All paths are set with the intent you should run this script from the root of the repo with the command
@@ -92,7 +92,7 @@ def find_backend(line: str) -> Optional[str]:
return "_and_".join(backends)
def read_init() -> Dict[str, List[str]]:
def read_init() -> dict[str, list[str]]:
"""
Read the init and extract backend-specific objects.
@@ -156,7 +156,7 @@ def create_dummy_object(name: str, backend_name: str) -> str:
return DUMMY_CLASS.format(name, backend_name)
def create_dummy_files(backend_specific_objects: Optional[Dict[str, List[str]]] = None) -> Dict[str, str]:
def create_dummy_files(backend_specific_objects: Optional[dict[str, list[str]]] = None) -> dict[str, str]:
"""
Create the content of the dummy files.