Make doc styler detect lists on rst (#9488)
This commit is contained in:
@@ -99,6 +99,7 @@ An instantiated benchmark object can then simply be run by calling ``benchmark.r
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
==================== ENVIRONMENT INFORMATION ====================
|
==================== ENVIRONMENT INFORMATION ====================
|
||||||
|
|
||||||
- transformers_version: 2.11.0
|
- transformers_version: 2.11.0
|
||||||
- framework: PyTorch
|
- framework: PyTorch
|
||||||
- use_torchscript: False
|
- use_torchscript: False
|
||||||
@@ -145,6 +146,7 @@ An instantiated benchmark object can then simply be run by calling ``benchmark.r
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
==================== ENVIRONMENT INFORMATION ====================
|
==================== ENVIRONMENT INFORMATION ====================
|
||||||
|
|
||||||
- transformers_version: 2.11.0
|
- transformers_version: 2.11.0
|
||||||
- framework: Tensorflow
|
- framework: Tensorflow
|
||||||
- use_xla: False
|
- use_xla: False
|
||||||
@@ -228,6 +230,7 @@ configurations must be inserted with the benchmark args as follows.
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
==================== ENVIRONMENT INFORMATION ====================
|
==================== ENVIRONMENT INFORMATION ====================
|
||||||
|
|
||||||
- transformers_version: 2.11.0
|
- transformers_version: 2.11.0
|
||||||
- framework: PyTorch
|
- framework: PyTorch
|
||||||
- use_torchscript: False
|
- use_torchscript: False
|
||||||
@@ -297,6 +300,7 @@ configurations must be inserted with the benchmark args as follows.
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
==================== ENVIRONMENT INFORMATION ====================
|
==================== ENVIRONMENT INFORMATION ====================
|
||||||
|
|
||||||
- transformers_version: 2.11.0
|
- transformers_version: 2.11.0
|
||||||
- framework: Tensorflow
|
- framework: Tensorflow
|
||||||
- use_xla: False
|
- use_xla: False
|
||||||
|
|||||||
@@ -381,9 +381,9 @@ def style_rst_file(doc_file, max_len=119, check_only=False):
|
|||||||
doc = f.read()
|
doc = f.read()
|
||||||
|
|
||||||
# Add missing new lines before lists
|
# Add missing new lines before lists
|
||||||
doc = _add_new_lines_before_list(doc)
|
clean_doc = _add_new_lines_before_list(doc)
|
||||||
# Style
|
# Style
|
||||||
clean_doc = rst_styler.style(doc, max_len=max_len)
|
clean_doc = rst_styler.style(clean_doc, max_len=max_len)
|
||||||
|
|
||||||
diff = clean_doc != doc
|
diff = clean_doc != doc
|
||||||
if not check_only and diff:
|
if not check_only and diff:
|
||||||
|
|||||||
Reference in New Issue
Block a user