Doc styler v2 (#14950)

* New doc styler

* Fix issue with args at the start

* Code sample fixes

* Style code examples in MDX

* Fix more patterns

* Typo

* Typo

* More patterns

* Do without black for now

* Get more info in error

* Docstring style

* Re-enable check

* Quality

* Fix add_end_docstring decorator

* Fix docstring
This commit is contained in:
Sylvain Gugger
2021-12-27 16:31:21 -05:00
committed by GitHub
parent c1138273d4
commit 87e6e4fe5c
437 changed files with 10810 additions and 10811 deletions

View File

@@ -48,13 +48,13 @@ quality:
isort --check-only $(check_dirs)
python utils/custom_init_isort.py --check_only
flake8 $(check_dirs)
# python utils/style_doc.py src/transformers docs/source --max_len 119 --check_only
python utils/style_doc.py src/transformers docs/source --max_len 119 --check_only
# Format source code automatically and check is there are any problems left that need manual fixing
extra_style_checks:
python utils/custom_init_isort.py
# python utils/style_doc.py src/transformers docs/source --max_len 119
python utils/style_doc.py src/transformers docs/source --max_len 119
# this target runs checks on all files and potentially modifies some of them