From 4500340186a9d3c7ad623b0e9cff7fabc1166518 Mon Sep 17 00:00:00 2001 From: Benjamin Wuethrich <8521043+bewuethr@users.noreply.github.com> Date: Tue, 21 Jul 2020 23:44:51 -0400 Subject: [PATCH] Add "(when enabled)" to default values Also, unquote strings. --- yamllint/rules/braces.py | 2 +- yamllint/rules/brackets.py | 2 +- yamllint/rules/colons.py | 2 +- yamllint/rules/commas.py | 2 +- yamllint/rules/comments.py | 2 +- yamllint/rules/document_end.py | 2 +- yamllint/rules/document_start.py | 2 +- yamllint/rules/empty_lines.py | 2 +- yamllint/rules/empty_values.py | 2 +- yamllint/rules/hyphens.py | 2 +- yamllint/rules/indentation.py | 4 ++-- yamllint/rules/line_length.py | 2 +- yamllint/rules/new_lines.py | 4 ++-- yamllint/rules/octal_values.py | 2 +- yamllint/rules/quoted_strings.py | 4 ++-- yamllint/rules/truthy.py | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/yamllint/rules/braces.py b/yamllint/rules/braces.py index fdeabb4..0d28aee 100644 --- a/yamllint/rules/braces.py +++ b/yamllint/rules/braces.py @@ -28,7 +28,7 @@ Use this rule to control the number of spaces inside braces (``{`` and ``}``). * ``max-spaces-inside-empty`` defines the maximal number of spaces allowed inside empty braces. -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml diff --git a/yamllint/rules/brackets.py b/yamllint/rules/brackets.py index 849536b..587c4f0 100644 --- a/yamllint/rules/brackets.py +++ b/yamllint/rules/brackets.py @@ -29,7 +29,7 @@ Use this rule to control the number of spaces inside brackets (``[`` and * ``max-spaces-inside-empty`` defines the maximal number of spaces allowed inside empty brackets. -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml diff --git a/yamllint/rules/colons.py b/yamllint/rules/colons.py index 0bf3220..5d0b41f 100644 --- a/yamllint/rules/colons.py +++ b/yamllint/rules/colons.py @@ -24,7 +24,7 @@ Use this rule to control the number of spaces before and after colons (``:``). * ``max-spaces-after`` defines the maximal number of spaces allowed after colons (use ``-1`` to disable). -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml diff --git a/yamllint/rules/commas.py b/yamllint/rules/commas.py index 9024a14..df17a6a 100644 --- a/yamllint/rules/commas.py +++ b/yamllint/rules/commas.py @@ -26,7 +26,7 @@ Use this rule to control the number of spaces before and after commas (``,``). * ``max-spaces-after`` defines the maximal number of spaces allowed after commas (use ``-1`` to disable). -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml diff --git a/yamllint/rules/comments.py b/yamllint/rules/comments.py index 55c9e90..70ae250 100644 --- a/yamllint/rules/comments.py +++ b/yamllint/rules/comments.py @@ -28,7 +28,7 @@ Use this rule to control the position and formatting of comments. content. It defines the minimal required number of spaces between a comment and its preceding content. -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml diff --git a/yamllint/rules/document_end.py b/yamllint/rules/document_end.py index d9e55f5..4e3302f 100644 --- a/yamllint/rules/document_end.py +++ b/yamllint/rules/document_end.py @@ -22,7 +22,7 @@ Use this rule to require or forbid the use of document end marker (``...``). * Set ``present`` to ``true`` when the document end marker is required, or to ``false`` when it is forbidden. -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml diff --git a/yamllint/rules/document_start.py b/yamllint/rules/document_start.py index b13b5ba..9bab4b4 100644 --- a/yamllint/rules/document_start.py +++ b/yamllint/rules/document_start.py @@ -22,7 +22,7 @@ Use this rule to require or forbid the use of document start marker (``---``). * Set ``present`` to ``true`` when the document start marker is required, or to ``false`` when it is forbidden. -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml diff --git a/yamllint/rules/empty_lines.py b/yamllint/rules/empty_lines.py index e7ba4cc..e2aeb8e 100644 --- a/yamllint/rules/empty_lines.py +++ b/yamllint/rules/empty_lines.py @@ -25,7 +25,7 @@ Use this rule to set a maximal number of allowed consecutive blank lines. * ``max-end`` defines the maximal number of empty lines allowed at the end of the file. This option takes precedence over ``max``. -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml diff --git a/yamllint/rules/empty_values.py b/yamllint/rules/empty_values.py index 93b0c14..e3e461f 100644 --- a/yamllint/rules/empty_values.py +++ b/yamllint/rules/empty_values.py @@ -23,7 +23,7 @@ Use this rule to prevent nodes with empty content, that implicitly result in * Use ``forbid-in-block-mappings`` to prevent empty values in block mappings. * Use ``forbid-in-flow-mappings`` to prevent empty values in flow mappings. -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml diff --git a/yamllint/rules/hyphens.py b/yamllint/rules/hyphens.py index 14a44b0..1c0fef8 100644 --- a/yamllint/rules/hyphens.py +++ b/yamllint/rules/hyphens.py @@ -22,7 +22,7 @@ Use this rule to control the number of spaces after hyphens (``-``). * ``max-spaces-after`` defines the maximal number of spaces allowed after hyphens. -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml diff --git a/yamllint/rules/indentation.py b/yamllint/rules/indentation.py index 55b2985..e353e06 100644 --- a/yamllint/rules/indentation.py +++ b/yamllint/rules/indentation.py @@ -32,13 +32,13 @@ Use this rule to control the indentation. * ``check-multi-line-strings`` defines whether to lint indentation in multi-line strings. Set to ``true`` to enable, ``false`` to disable. -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml rules: indentation: - spaces: 'consistent' + spaces: consistent indent-sequences: true check-multi-line-strings: false diff --git a/yamllint/rules/line_length.py b/yamllint/rules/line_length.py index 08d096e..b329817 100644 --- a/yamllint/rules/line_length.py +++ b/yamllint/rules/line_length.py @@ -30,7 +30,7 @@ recommend running yamllint with Python 3. * ``allow-non-breakable-inline-mappings`` implies ``allow-non-breakable-words`` and extends it to also allow non-breakable words in inline mappings. -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml diff --git a/yamllint/rules/new_lines.py b/yamllint/rules/new_lines.py index d70f5a5..fb3ea83 100644 --- a/yamllint/rules/new_lines.py +++ b/yamllint/rules/new_lines.py @@ -22,13 +22,13 @@ Use this rule to force the type of new line characters. * Set ``type`` to ``unix`` to use UNIX-typed new line characters (``\\n``), or ``dos`` to use DOS-typed new line characters (``\\r\\n``). -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml rules: new-lines: - type: 'unix' + type: unix """ diff --git a/yamllint/rules/octal_values.py b/yamllint/rules/octal_values.py index aaf5164..faa38aa 100644 --- a/yamllint/rules/octal_values.py +++ b/yamllint/rules/octal_values.py @@ -25,7 +25,7 @@ converted to ``8``. * Use ``forbid-implicit-octal`` to prevent numbers starting with ``0``. * Use ``forbid-explicit-octal`` to prevent numbers starting with ``0o``. -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml diff --git a/yamllint/rules/quoted_strings.py b/yamllint/rules/quoted_strings.py index 14b9005..78a2556 100644 --- a/yamllint/rules/quoted_strings.py +++ b/yamllint/rules/quoted_strings.py @@ -34,13 +34,13 @@ used. **Note**: Multi-line strings (with ``|`` or ``>``) will not be checked. -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml rules: quoted-strings: - quote-type: 'any' + quote-type: any required: true extra-required: [] extra-allowed: [] diff --git a/yamllint/rules/truthy.py b/yamllint/rules/truthy.py index eda968e..7f91565 100644 --- a/yamllint/rules/truthy.py +++ b/yamllint/rules/truthy.py @@ -34,7 +34,7 @@ This can be useful to prevent surprises from YAML parsers transforming ``truthy`` rule applies to both keys and values. Set this option to ``false`` to prevent this. -.. rubric:: Default values +.. rubric:: Default values (when enabled) .. code-block:: yaml