Sort doc toc (#18034)

* Add script to sort doc ToC

* Style and fixes

* Add check to quality job
This commit is contained in:
Sylvain Gugger
2022-07-07 08:17:58 -04:00
committed by GitHub
parent 1b5ea74783
commit 1b749a7f8d
4 changed files with 99 additions and 8 deletions

View File

@@ -51,6 +51,7 @@ quality:
python utils/sort_auto_mappings.py --check_only
flake8 $(check_dirs)
doc-builder style src/transformers docs/source --max_len 119 --check_only --path_to_docs docs/source
python utils/check_doc_toc.py
# Format source code automatically and check is there are any problems left that need manual fixing
@@ -58,6 +59,7 @@ extra_style_checks:
python utils/custom_init_isort.py
python utils/sort_auto_mappings.py
doc-builder style src/transformers docs/source --max_len 119 --path_to_docs docs/source
python utils/check_doc_toc.py --fix_and_overwrite
# this target runs checks on all files and potentially modifies some of them