From 3cfd4993381481ba3c8ae50ba4515bc802853161 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Mon, 20 Sep 2021 11:29:04 +0100 Subject: [PATCH 01/57] Ensure indentation is preserved with nested directives. --- snippet_fmt/__init__.py | 2 +- tests/example.rst | 11 +++++++++++ ...snippet_fmt_custom_entry_point_example_rst_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_empty_0_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_empty_1_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_empty_2_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_empty_3_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_empty_4_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_empty_5_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_empty_6_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_empty_7_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_0_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_1_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_2_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_3_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_4_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_5_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_6_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_7_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_caps_0_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_caps_1_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_caps_2_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_caps_3_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_caps_4_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_caps_5_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_caps_6_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_ini_caps_7_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_ini_python_false_0_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_ini_python_false_1_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_ini_python_false_2_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_ini_python_false_3_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_ini_python_false_4_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_ini_python_false_5_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_ini_python_false_6_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_ini_python_false_7_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_0_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_1_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_2_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_3_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_4_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_5_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_6_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_7_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_caps_0_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_caps_1_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_caps_2_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_caps_3_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_caps_4_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_caps_5_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_caps_6_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_json_caps_7_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_json_caps_indent_0_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_json_caps_indent_1_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_json_caps_indent_2_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_json_caps_indent_3_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_json_caps_indent_4_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_json_caps_indent_5_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_json_caps_indent_6_.rst | 11 +++++++++++ ...snippet_fmt_example_rst_json_caps_indent_7_.rst | 11 +++++++++++ ...test_snippet_fmt_example_rst_json_indent_0_.rst | 14 ++++++++++++++ ...test_snippet_fmt_example_rst_json_indent_0_.yml | 11 +++++++++++ ...test_snippet_fmt_example_rst_json_indent_1_.rst | 11 +++++++++++ ...test_snippet_fmt_example_rst_json_indent_2_.rst | 11 +++++++++++ ...test_snippet_fmt_example_rst_json_indent_3_.rst | 11 +++++++++++ ...test_snippet_fmt_example_rst_json_indent_4_.rst | 14 ++++++++++++++ ...test_snippet_fmt_example_rst_json_indent_4_.yml | 11 +++++++++++ ...test_snippet_fmt_example_rst_json_indent_5_.rst | 14 ++++++++++++++ ...test_snippet_fmt_example_rst_json_indent_5_.yml | 11 +++++++++++ ...test_snippet_fmt_example_rst_json_indent_6_.rst | 14 ++++++++++++++ ...test_snippet_fmt_example_rst_json_indent_6_.yml | 11 +++++++++++ ...test_snippet_fmt_example_rst_json_indent_7_.rst | 14 ++++++++++++++ ...test_snippet_fmt_example_rst_json_indent_7_.yml | 11 +++++++++++ .../test_snippet_fmt_example_rst_python3_0_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python3_1_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python3_2_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python3_3_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python3_4_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python3_5_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python3_6_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python3_7_.rst | 11 +++++++++++ ...ippet_fmt_example_rst_python3_toml_false_0_.rst | 11 +++++++++++ ...ippet_fmt_example_rst_python3_toml_false_1_.rst | 11 +++++++++++ ...ippet_fmt_example_rst_python3_toml_false_2_.rst | 11 +++++++++++ ...ippet_fmt_example_rst_python3_toml_false_3_.rst | 11 +++++++++++ ...ippet_fmt_example_rst_python3_toml_false_4_.rst | 11 +++++++++++ ...ippet_fmt_example_rst_python3_toml_false_5_.rst | 11 +++++++++++ ...ippet_fmt_example_rst_python3_toml_false_6_.rst | 11 +++++++++++ ...ippet_fmt_example_rst_python3_toml_false_7_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python_0_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python_1_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python_2_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python_3_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python_4_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python_5_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python_6_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_python_7_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_0_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_1_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_2_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_3_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_4_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_5_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_6_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_7_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_caps_0_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_caps_1_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_caps_2_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_caps_3_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_caps_4_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_caps_5_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_caps_6_.rst | 11 +++++++++++ .../test_snippet_fmt_example_rst_toml_caps_7_.rst | 11 +++++++++++ ...nippet_fmt_example_rst_toml_python_false_0_.rst | 11 +++++++++++ ...nippet_fmt_example_rst_toml_python_false_1_.rst | 11 +++++++++++ ...nippet_fmt_example_rst_toml_python_false_2_.rst | 11 +++++++++++ ...nippet_fmt_example_rst_toml_python_false_3_.rst | 11 +++++++++++ ...nippet_fmt_example_rst_toml_python_false_4_.rst | 11 +++++++++++ ...nippet_fmt_example_rst_toml_python_false_5_.rst | 11 +++++++++++ ...nippet_fmt_example_rst_toml_python_false_6_.rst | 11 +++++++++++ ...nippet_fmt_example_rst_toml_python_false_7_.rst | 11 +++++++++++ 120 files changed, 1325 insertions(+), 1 deletion(-) diff --git a/snippet_fmt/__init__.py b/snippet_fmt/__init__.py index ed4bd19..8a38639 100644 --- a/snippet_fmt/__init__.py +++ b/snippet_fmt/__init__.py @@ -167,7 +167,7 @@ def process_match(self, match: Match[str]) -> str: with syntaxerror_for_file(self.filename): code = formatter(code, **lang_config) - code = textwrap.indent(code, match["body_indent"]) + code = textwrap.indent(code, match["indent"] + match["body_indent"]) return f'{match["before"]}{code.rstrip()}{trailing_ws}' def get_diff(self) -> str: diff --git a/tests/example.rst b/tests/example.rst index a66882d..ad841f6 100644 --- a/tests/example.rst +++ b/tests/example.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_custom_entry_point_example_rst_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_custom_entry_point_example_rst_.rst index 16dd791..90a6bf1 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_custom_entry_point_example_rst_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_custom_entry_point_example_rst_.rst @@ -119,3 +119,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.rst index 4ac759c..5ebbed8 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.rst @@ -133,3 +133,17 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.yml index 1f9153e..39cd0be 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.yml @@ -17,5 +17,16 @@ out: - '' - '' - ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" - '' - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.rst index 4ac759c..5ebbed8 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.rst @@ -133,3 +133,17 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.yml index 1f9153e..39cd0be 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.yml @@ -17,5 +17,16 @@ out: - '' - '' - ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" - '' - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.rst index 4ac759c..5ebbed8 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.rst @@ -133,3 +133,17 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.yml index 1f9153e..39cd0be 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.yml @@ -17,5 +17,16 @@ out: - '' - '' - ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" - '' - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.rst index 4ac759c..5ebbed8 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.rst @@ -133,3 +133,17 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.yml index 1f9153e..39cd0be 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.yml @@ -17,5 +17,16 @@ out: - '' - '' - ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" - '' - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.rst index 4ac759c..5ebbed8 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.rst @@ -133,3 +133,17 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.yml index 1f9153e..39cd0be 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.yml @@ -17,5 +17,16 @@ out: - '' - '' - ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" - '' - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_0_.rst index 94b43f6..05d5f3f 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_2_.rst index bb33f48..76f1d18 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_2_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_4_.rst index 94b43f6..05d5f3f 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_5_.rst index adfc23c..d037230 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_5_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_6_.rst index adfc23c..d037230 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_6_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_7_.rst index 94b43f6..05d5f3f 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_0_.rst index 94b43f6..05d5f3f 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_2_.rst index bb33f48..76f1d18 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_2_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_4_.rst index 94b43f6..05d5f3f 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_5_.rst index adfc23c..d037230 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_5_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.rst index adfc23c..d037230 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_7_.rst index 94b43f6..05d5f3f 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_0_.rst index 010d91b..144c36c 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_0_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_1_.rst index cbcff65..7686862 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_1_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_3_.rst index f345f30..263db68 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_3_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_4_.rst index b904b0c..23f4fc1 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_4_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_5_.rst index b904b0c..23f4fc1 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_5_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_6_.rst index ccdd5cb..0d0b886 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_6_.rst @@ -127,3 +127,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_7_.rst index 0a01458..44a5a49 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_7_.rst @@ -127,3 +127,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst index 666b791..25e85f2 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst index 666b791..25e85f2 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst index 666b791..25e85f2 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst index 666b791..25e85f2 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst index 666b791..25e85f2 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst index 8a1fa19..bbc4ea4 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst index 8a1fa19..bbc4ea4 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst index 8a1fa19..bbc4ea4 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst index 8a1fa19..bbc4ea4 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst index 8a1fa19..bbc4ea4 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst index 666b791..25e85f2 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst index 666b791..25e85f2 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst index 666b791..25e85f2 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst index 666b791..25e85f2 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst index 666b791..25e85f2 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding From 2a6eaab25aa36b33f569e953d7c03c5ef296c0e2 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Mon, 20 Sep 2021 12:07:57 +0100 Subject: [PATCH 02/57] Bump version v0.1.2 -> v0.1.3 --- .bumpversion.cfg | 2 +- README.rst | 2 +- doc-source/index.rst | 2 +- doc-source/usage.rst | 2 +- pyproject.toml | 2 +- repo_helper.yml | 2 +- snippet_fmt/__init__.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 7edd6f1..911c224 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.2 +current_version = 0.1.3 commit = True tag = True diff --git a/README.rst b/README.rst index afd3705..c62e030 100644 --- a/README.rst +++ b/README.rst @@ -91,7 +91,7 @@ snippet-fmt .. |language| image:: https://img.shields.io/github/languages/top/python-formate/snippet-fmt :alt: GitHub top language -.. |commits-since| image:: https://img.shields.io/github/commits-since/python-formate/snippet-fmt/v0.1.2 +.. |commits-since| image:: https://img.shields.io/github/commits-since/python-formate/snippet-fmt/v0.1.3 :target: https://github.com/python-formate/snippet-fmt/pulse :alt: GitHub commits since tagged version diff --git a/doc-source/index.rst b/doc-source/index.rst index efb8a6e..04155da 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -97,7 +97,7 @@ snippet-fmt :alt: GitHub top language .. |commits-since| github-shield:: - :commits-since: v0.1.2 + :commits-since: v0.1.3 :alt: GitHub commits since tagged version .. |commits-latest| github-shield:: diff --git a/doc-source/usage.rst b/doc-source/usage.rst index 20c8dfe..d1a6c40 100644 --- a/doc-source/usage.rst +++ b/doc-source/usage.rst @@ -22,7 +22,7 @@ To do so, add the following to your `.pre-commit-config.yaml `_ file: .. pre-commit:: - :rev: 0.1.2 + :rev: 0.1.3 :hooks: snippet-fmt :args: --verbose diff --git a/pyproject.toml b/pyproject.toml index 780131d..fae2e16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "whey" [project] name = "snippet-fmt" -version = "0.1.2" +version = "0.1.3" description = "Format and validate code snippets in reStructuredText files." readme = "README.rst" keywords = [ "docs", "formatting", "linting",] diff --git a/repo_helper.yml b/repo_helper.yml index 125efce..9fe324f 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -6,7 +6,7 @@ author: 'Dominic Davis-Foster' email: 'dominic@davis-foster.co.uk' username: 'python-formate' assignee: 'domdfcoding' -version: '0.1.2' +version: '0.1.3' license: 'MIT' short_desc: 'Format and validate code snippets in reStructuredText files.' diff --git a/snippet_fmt/__init__.py b/snippet_fmt/__init__.py index 8a38639..84abff4 100644 --- a/snippet_fmt/__init__.py +++ b/snippet_fmt/__init__.py @@ -53,7 +53,7 @@ __author__: str = "Dominic Davis-Foster" __copyright__: str = "2021 Dominic Davis-Foster" __license__: str = "MIT License" -__version__: str = "0.1.2" +__version__: str = "0.1.3" __email__: str = "dominic@davis-foster.co.uk" __all__ = ["CodeBlockError", "RSTReformatter", "reformat_file"] From be6baf18b56b3beeafc3542c7352b4bfba800bd7 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 15:17:30 +0000 Subject: [PATCH 03/57] [repo-helper] Configuration Update (#8) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c7dc41..3b4b568 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -73,7 +73,7 @@ repos: - id: forbid-crlf - repo: https://github.com/python-formate/snippet-fmt - rev: v0.1.1 + rev: v0.1.3 hooks: - id: snippet-fmt From f72b562e257c53f77f68cc165ead8b5c6a1991d2 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Thu, 23 Sep 2021 10:17:48 +0100 Subject: [PATCH 04/57] Fix typo in regex. --- snippet_fmt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippet_fmt/__init__.py b/snippet_fmt/__init__.py index 84abff4..231a091 100644 --- a/snippet_fmt/__init__.py +++ b/snippet_fmt/__init__.py @@ -129,7 +129,7 @@ def run(self) -> bool: rf'((?P=indent)[ \t]+:.*\n)*' # Limitation: should be `(?P=body_indent)` rather than `[ \t]+` rf'\n*' rf')' - rf'(?P^((?P=indent)(?P[ \t]+).*)?\n(^((?P=indent)(?P=body_indent).*)?\n)+)', + rf'(?P^((?P=indent)(?P[ \t]+).*)?\n(^((?P=indent)(?P=body_indent).*)?\n)*)', re.MULTILINE, ) From f9986539e863c19c26e328ee633dad46eb866915 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Thu, 23 Sep 2021 10:21:55 +0100 Subject: [PATCH 05/57] Update changelog. --- doc-source/changelog.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc-source/changelog.rst b/doc-source/changelog.rst index 5d64215..f398354 100644 --- a/doc-source/changelog.rst +++ b/doc-source/changelog.rst @@ -2,6 +2,21 @@ Changelog =============== +v0.1.4 +---------- + +Fixed typo in the regular expression preventing single line code blocks from matching. + +v0.1.3 +---------- + +Ensure indentation is preserved with nested directives. + +v0.1.2 +---------- + +Correctly handle indentation containing mixed tabs and spaces. + v0.1.1 ---------- From deee67644650a4f4650f00180eef25dfb7cad1fd Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Thu, 23 Sep 2021 10:22:27 +0100 Subject: [PATCH 06/57] Update our own configuration. --- .pre-commit-config.yaml | 2 +- pyproject.toml | 3 +-- repo_helper.yml | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3b4b568..096fa2c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ # This file is managed by 'repo_helper'. Don't edit it directly. --- -exclude: ^$ +exclude: ^(tests/test_snippet_fmt_/.*\.rst|tests/example.rst)$ repos: - repo: https://github.com/repo-helper/pyproject-parser diff --git a/pyproject.toml b/pyproject.toml index fae2e16..e72dbd8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -147,8 +147,7 @@ include = false order = 30 include = false -[tool.snippet-fmt.languages.toml] -reformat = true +[tool.snippet-fmt.languages.python3] [tool.snippet-fmt.languages.python] reformat = true diff --git a/repo_helper.yml b/repo_helper.yml index 9fe324f..d6babfc 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -62,3 +62,5 @@ third_party_version_matrix: click: - 7 - 8 + +pre_commit_exclude: "^(tests/test_snippet_fmt_/.*\\.rst|tests/example.rst)$" From b8e89f5df08edb791a5b9eae551c905c0a8dda09 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Thu, 23 Sep 2021 10:35:15 +0100 Subject: [PATCH 07/57] Bump version v0.1.3 -> v0.1.4 --- .bumpversion.cfg | 2 +- README.rst | 2 +- doc-source/index.rst | 2 +- doc-source/usage.rst | 2 +- pyproject.toml | 2 +- repo_helper.yml | 2 +- snippet_fmt/__init__.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 911c224..5448bb2 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.3 +current_version = 0.1.4 commit = True tag = True diff --git a/README.rst b/README.rst index c62e030..9ba6dab 100644 --- a/README.rst +++ b/README.rst @@ -91,7 +91,7 @@ snippet-fmt .. |language| image:: https://img.shields.io/github/languages/top/python-formate/snippet-fmt :alt: GitHub top language -.. |commits-since| image:: https://img.shields.io/github/commits-since/python-formate/snippet-fmt/v0.1.3 +.. |commits-since| image:: https://img.shields.io/github/commits-since/python-formate/snippet-fmt/v0.1.4 :target: https://github.com/python-formate/snippet-fmt/pulse :alt: GitHub commits since tagged version diff --git a/doc-source/index.rst b/doc-source/index.rst index 04155da..e436d90 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -97,7 +97,7 @@ snippet-fmt :alt: GitHub top language .. |commits-since| github-shield:: - :commits-since: v0.1.3 + :commits-since: v0.1.4 :alt: GitHub commits since tagged version .. |commits-latest| github-shield:: diff --git a/doc-source/usage.rst b/doc-source/usage.rst index d1a6c40..ea1b962 100644 --- a/doc-source/usage.rst +++ b/doc-source/usage.rst @@ -22,7 +22,7 @@ To do so, add the following to your `.pre-commit-config.yaml `_ file: .. pre-commit:: - :rev: 0.1.3 + :rev: 0.1.4 :hooks: snippet-fmt :args: --verbose diff --git a/pyproject.toml b/pyproject.toml index e72dbd8..49e7713 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "whey" [project] name = "snippet-fmt" -version = "0.1.3" +version = "0.1.4" description = "Format and validate code snippets in reStructuredText files." readme = "README.rst" keywords = [ "docs", "formatting", "linting",] diff --git a/repo_helper.yml b/repo_helper.yml index d6babfc..42b92da 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -6,7 +6,7 @@ author: 'Dominic Davis-Foster' email: 'dominic@davis-foster.co.uk' username: 'python-formate' assignee: 'domdfcoding' -version: '0.1.3' +version: '0.1.4' license: 'MIT' short_desc: 'Format and validate code snippets in reStructuredText files.' diff --git a/snippet_fmt/__init__.py b/snippet_fmt/__init__.py index 231a091..d0e76cc 100644 --- a/snippet_fmt/__init__.py +++ b/snippet_fmt/__init__.py @@ -53,7 +53,7 @@ __author__: str = "Dominic Davis-Foster" __copyright__: str = "2021 Dominic Davis-Foster" __license__: str = "MIT License" -__version__: str = "0.1.3" +__version__: str = "0.1.4" __email__: str = "dominic@davis-foster.co.uk" __all__ = ["CodeBlockError", "RSTReformatter", "reformat_file"] From 38f3c0796370a24351aeaff8ec426905d804c693 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Wed, 22 Dec 2021 07:02:38 +0000 Subject: [PATCH 08/57] [repo-helper] Configuration Update (#9) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/cleanup.yml | 14 -------------- .github/workflows/docs_test_action.yml | 2 +- .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 9 +++++++-- .github/workflows/python_ci_macos.yml | 4 ++-- .pre-commit-config.yaml | 2 +- tox.ini | 11 +++++++++-- 7 files changed, 22 insertions(+), 24 deletions(-) delete mode 100644 .github/workflows/cleanup.yml diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml deleted file mode 100644 index 741c0bd..0000000 --- a/.github/workflows/cleanup.yml +++ /dev/null @@ -1,14 +0,0 @@ -# This file is managed by 'repo_helper'. Don't edit it directly. ---- -name: Artefact Cleaner -on: - schedule: - - cron: 0 9 1 * * -jobs: - Clean: - runs-on: ubuntu-latest - steps: - - name: cleanup - uses: glassechidna/artifact-cleaner@v2 - with: - minimumAge: 1000000.0 diff --git a/.github/workflows/docs_test_action.yml b/.github/workflows/docs_test_action.yml index 8eb7a54..bd2510e 100644 --- a/.github/workflows/docs_test_action.yml +++ b/.github/workflows/docs_test_action.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: "actions/checkout@v1" + uses: "actions/checkout@v2" - name: Check for changed files uses: dorny/paths-filter@v2 diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 4f703f7..4e22987 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -21,7 +21,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-rc.2' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10' strategy: fail-fast: False @@ -31,7 +31,7 @@ jobs: - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - - {python-version: "3.10.0-rc.2", testenvs: "py310-dev-click{7,8},build", experimental: True} + - {python-version: "3.10", testenvs: "py310-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 557668f..5507043 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -22,7 +22,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-rc.2' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10' strategy: fail-fast: False @@ -32,7 +32,7 @@ jobs: - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - - {python-version: "3.10.0-rc.2", testenvs: "py310-dev-click{7,8},build", experimental: True} + - {python-version: "3.10", testenvs: "py310-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ @@ -99,21 +99,26 @@ jobs: path: coverage - name: Display structure of downloaded files + id: show run: ls -R working-directory: coverage + continue-on-error: true - name: Combine Coverage 👷 + if: ${{ steps.show.outcome != 'failure' }} run: | shopt -s globstar python -m coverage combine coverage/**/.coverage - name: "Upload Combined Coverage Artefact 🚀" + if: ${{ steps.show.outcome != 'failure' }} uses: actions/upload-artifact@v2 with: name: "combined-coverage" path: .coverage - name: "Upload Combined Coverage to Coveralls" + if: ${{ steps.show.outcome != 'failure' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index bfd2eb4..c0d1336 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -21,7 +21,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-rc.2' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10' strategy: fail-fast: False @@ -31,7 +31,7 @@ jobs: - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - - {python-version: "3.10.0-rc.2", testenvs: "py310-dev-click{7,8},build", experimental: True} + - {python-version: "3.10", testenvs: "py310-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 096fa2c..8e9c659 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: - id: end-of-file-fixer - repo: https://github.com/domdfcoding/pre-commit-hooks - rev: v0.2.1 + rev: v0.3.0 hooks: - id: requirements-txt-sorter args: diff --git a/tox.ini b/tox.ini index 83db186..a57e442 100644 --- a/tox.ini +++ b/tox.ini @@ -42,7 +42,9 @@ qa = mypy, lint cov = py36-click7, coverage [testenv] -setenv = PYTHONDEVMODE = 1 +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 deps = -r{toxinidir}/tests/requirements.txt click7: click~=7.0 @@ -87,13 +89,14 @@ deps = flake8-noqa>=1.1.0 flake8-pyi>=20.10.0 flake8-pytest-style>=1.3.0 + flake8-quotes>=3.3.0 flake8-slots>=0.1.0 flake8-sphinx-links>=0.0.4 flake8-strftime>=0.1.1 flake8-typing-imports>=1.10.0 - git+https://github.com/domdfcoding/flake8-quotes.git git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git git+https://github.com/domdfcoding/flake8-rst-docstrings.git + git+https://github.com/python-formate/flake8-unused-arguments.git@magic-methods pydocstyle>=6.0.0 pygments>=2.7.1 importlib_metadata<4.5.0; python_version<'3.8' @@ -154,6 +157,10 @@ multiline-quotes = """ docstring-quotes = """ count = True min_python_version = 3.6.1 +unused-arguments-ignore-abstract-functions = True +unused-arguments-ignore-overload-functions = True +unused-arguments-ignore-magic-methods = True +unused-arguments-ignore-variadic-names = True [coverage:run] plugins = coverage_pyver_pragma From 4cfdcdecae223fcfc8bd7271b269e955f8674062 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 07:19:47 +0000 Subject: [PATCH 09/57] Updated files with 'repo_helper'. (#10) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- README.rst | 2 +- doc-source/index.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8e9c659..4250154 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -73,7 +73,7 @@ repos: - id: forbid-crlf - repo: https://github.com/python-formate/snippet-fmt - rev: v0.1.3 + rev: v0.1.4 hooks: - id: snippet-fmt diff --git a/README.rst b/README.rst index 9ba6dab..763a789 100644 --- a/README.rst +++ b/README.rst @@ -99,7 +99,7 @@ snippet-fmt :target: https://github.com/python-formate/snippet-fmt/commit/master :alt: GitHub last commit -.. |maintained| image:: https://img.shields.io/maintenance/yes/2021 +.. |maintained| image:: https://img.shields.io/maintenance/yes/2022 :alt: Maintenance .. |pypi-downloads| image:: https://img.shields.io/pypi/dm/snippet-fmt diff --git a/doc-source/index.rst b/doc-source/index.rst index e436d90..e7ac261 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -104,7 +104,7 @@ snippet-fmt :last-commit: :alt: GitHub last commit - .. |maintained| maintained-shield:: 2021 + .. |maintained| maintained-shield:: 2022 :alt: Maintenance .. |pypi-downloads| pypi-shield:: From 19351a9346207534ef2a336b1156a1c1483d3759 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Sun, 16 Jan 2022 16:39:44 +0000 Subject: [PATCH 10/57] Update docs config. --- doc-source/_templates/base.html | 1 + doc-source/configuration.rst | 3 ++- doc-source/requirements.txt | 1 + pyproject.toml | 2 +- repo_helper.yml | 3 +-- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc-source/_templates/base.html b/doc-source/_templates/base.html index b101b24..ffdc5ad 100644 --- a/doc-source/_templates/base.html +++ b/doc-source/_templates/base.html @@ -2,4 +2,5 @@ {% extends "!base.html" %} {% block extrahead %} + {% endblock %} diff --git a/doc-source/configuration.rst b/doc-source/configuration.rst index 745d5e0..ae5b4c5 100644 --- a/doc-source/configuration.rst +++ b/doc-source/configuration.rst @@ -177,7 +177,7 @@ Example .. code-block:: toml [tool.snippet-fmt] - directives = ['code', 'code-block', 'sourcecode'] + directives = [ "code", "code-block", "sourcecode",] [tool.snippet-fmt.languages.python] reformat = true @@ -187,6 +187,7 @@ Example reformat = true [tool.snippet-fmt.languages.toml] + [tool.snippet-fmt.languages.ini] This will: diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index 6708def..75aff01 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -3,6 +3,7 @@ git+https://github.com/sphinx-toolbox/sphinx-toolbox-experimental.git default-values>=0.5.0 extras-require>=0.2.0 furo>=2020.11.19b18 +html-section>=0.1.0 seed-intersphinx-mapping>=0.3.1 sphinx>=3.0.3 sphinx-copybutton>=0.2.12 diff --git a/pyproject.toml b/pyproject.toml index 49e7713..23edcf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,10 +68,10 @@ extensions = [ "sphinx_debuginfo", "sphinx_licenseinfo", "seed_intersphinx_mapping", + "html_section", "attr_utils.autoattrs", "sphinx_click", "sphinx_toolbox.pre_commit", - "sphinx_toolbox_experimental.html_section", "sphinx_toolbox_experimental.autosummary_widths", "sphinx_toolbox_experimental.missing_xref", "sphinx_packaging", diff --git a/repo_helper.yml b/repo_helper.yml index 42b92da..0492643 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -14,7 +14,7 @@ enable_conda: false use_whey: true min_coverage: 95 sphinx_html_theme: furo -#preserve_custom_theme: true +preserve_custom_theme: true mypy_version: "0.910" docs_fail_on_warning: true @@ -42,7 +42,6 @@ extra_sphinx_extensions: - attr_utils.autoattrs - sphinx_click - sphinx_toolbox.pre_commit - - sphinx_toolbox_experimental.html_section - sphinx_toolbox_experimental.autosummary_widths # - sphinx_toolbox_experimental.changelog - sphinx_toolbox_experimental.missing_xref From 6e35f9918d0d273825d050ede6dc6e5c33aa210b Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Sun, 16 Jan 2022 16:43:34 +0000 Subject: [PATCH 11/57] Bump mypy version. --- repo_helper.yml | 4 ++-- tox.ini | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repo_helper.yml b/repo_helper.yml index 0492643..8d62ccf 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -15,7 +15,6 @@ use_whey: true min_coverage: 95 sphinx_html_theme: furo preserve_custom_theme: true -mypy_version: "0.910" docs_fail_on_warning: true python_versions: @@ -23,7 +22,8 @@ python_versions: - '3.7' - '3.8' - '3.9' - - 3.10-dev + - "3.10" + - 3.11-dev keywords: - formatting diff --git a/tox.ini b/tox.ini index a57e442..03d13ce 100644 --- a/tox.ini +++ b/tox.ini @@ -107,7 +107,7 @@ basepython = python3.6 ignore_errors = True changedir = {toxinidir} deps = - mypy==0.910 + mypy==0.931 -r{toxinidir}/tests/requirements.txt commands = mypy snippet_fmt tests {posargs} From b595e420669589ec9aad79c54d26fa0f062fb2b3 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Sun, 16 Jan 2022 16:47:58 +0000 Subject: [PATCH 12/57] Test with Python 3.11 --- .github/workflows/python_ci.yml | 5 +++-- .github/workflows/python_ci_linux.yml | 5 +++-- .github/workflows/python_ci_macos.yml | 5 +++-- pyproject.toml | 2 +- tox.ini | 6 ++++-- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 4e22987..401f455 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -21,7 +21,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.3' strategy: fail-fast: False @@ -31,7 +31,8 @@ jobs: - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - - {python-version: "3.10", testenvs: "py310-dev-click{7,8},build", experimental: True} + - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} + - {python-version: "3.11.0-alpha.3", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 5507043..488db75 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -22,7 +22,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.3' strategy: fail-fast: False @@ -32,7 +32,8 @@ jobs: - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - - {python-version: "3.10", testenvs: "py310-dev-click{7,8},build", experimental: True} + - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} + - {python-version: "3.11.0-alpha.3", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index c0d1336..f051e56 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -21,7 +21,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.3' strategy: fail-fast: False @@ -31,7 +31,8 @@ jobs: - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - - {python-version: "3.10", testenvs: "py310-dev-click{7,8},build", experimental: True} + - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} + - {python-version: "3.11.0-alpha.3", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/pyproject.toml b/pyproject.toml index 23edcf0..835a00d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ base-classifiers = [ "Intended Audience :: Developers", "Typing :: Typed", ] -python-versions = [ "3.6", "3.7", "3.8", "3.9",] +python-versions = [ "3.6", "3.7", "3.8", "3.9", "3.10",] python-implementations = [ "CPython",] platforms = [ "Windows", "macOS", "Linux",] license-key = "MIT" diff --git a/tox.ini b/tox.ini index 03d13ce..3b4edb1 100644 --- a/tox.ini +++ b/tox.ini @@ -21,7 +21,8 @@ envlist = py37-click{7,8} py38-click{7,8} py39-click{7,8} - py310-dev-click{7,8} + py310-click{7,8} + py311-dev-click{7,8} mypy build skip_missing_interpreters = True @@ -37,7 +38,8 @@ test = py37-click{7,8} py38-click{7,8} py39-click{7,8} - py310-dev-click{7,8} + py310-click{7,8} + py311-dev-click{7,8} qa = mypy, lint cov = py36-click7, coverage From 10c7f160d3e55f7e18c4bc7d978356612484f41d Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Sun, 16 Jan 2022 19:08:08 +0000 Subject: [PATCH 13/57] Updated files with 'repo_helper'. (#11) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- __pkginfo__.py | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 __pkginfo__.py diff --git a/__pkginfo__.py b/__pkginfo__.py deleted file mode 100644 index ea4ef04..0000000 --- a/__pkginfo__.py +++ /dev/null @@ -1,16 +0,0 @@ -# This file is managed by 'repo_helper'. Don't edit it directly. -# Copyright © 2020 Dominic Davis-Foster -# -# This file is distributed under the same license terms as the program it came with. -# There will probably be a file called LICEN[S/C]E in the same directory as this file. -# -# In any case, this program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# This script based on https://github.com/rocky/python-uncompyle6/blob/master/__pkginfo__.py -# - -__all__ = ["extras_require"] - -extras_require = {} From f80010df6bd730e3cd2adfa466cccf09278296de Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Mon, 17 Jan 2022 21:11:28 +0000 Subject: [PATCH 14/57] Run tests with warnings as errors. --- tox.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tox.ini b/tox.ini index 3b4edb1..5c8490d 100644 --- a/tox.ini +++ b/tox.ini @@ -186,3 +186,7 @@ package = snippet_fmt [pytest] addopts = --color yes --durations 25 timeout = 300 +filterwarnings = + error + ignore:lib2to3 package is deprecated and may not be able to parse Python 3.10+:DeprecationWarning + ignore:lib2to3 package is deprecated and may not be able to parse Python 3.10+:PendingDeprecationWarning From 4e759ce9f808b417df3310d8473e02d9996b224b Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 22:20:35 +0000 Subject: [PATCH 15/57] Updated files with 'repo_helper'. (#12) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4250154..cf8cf62 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,7 +40,7 @@ repos: - id: bind-requirements - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.1.7 + rev: v0.1.8 hooks: - id: ensure-dunder-all files: ^snippet_fmt/.*\.py$ From b00ea78131142b239a5cd35338e063fb75b826d5 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Tue, 18 Jan 2022 11:02:36 +0000 Subject: [PATCH 16/57] Update our own config in pyproject.toml --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 835a00d..8081a55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -147,7 +147,8 @@ include = false order = 30 include = false -[tool.snippet-fmt.languages.python3] +[tool.snippet-fmt.languages.toml] +reformat = true [tool.snippet-fmt.languages.python] reformat = true From 033ac294a21fd428efd4631a20badbca8de35b97 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Sat, 5 Feb 2022 09:56:55 +0000 Subject: [PATCH 17/57] [repo-helper] Configuration Update (#13) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/milestones.py | 28 +++++++++++++++++++++++++++ .github/workflows/python_ci.yml | 5 +++-- .github/workflows/python_ci_linux.yml | 19 +++++++++++++----- .github/workflows/python_ci_macos.yml | 5 +++-- .pre-commit-config.yaml | 2 +- setup.cfg | 10 ---------- tox.ini | 4 +--- 7 files changed, 50 insertions(+), 23 deletions(-) create mode 100755 .github/milestones.py delete mode 100644 setup.cfg diff --git a/.github/milestones.py b/.github/milestones.py new file mode 100755 index 0000000..5e868dc --- /dev/null +++ b/.github/milestones.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +# stdlib +import os +import sys + +# 3rd party +from github3 import GitHub +from github3.repos import Repository +from packaging.version import InvalidVersion, Version + +latest_tag = os.environ["GITHUB_REF_NAME"] + +try: + current_version = Version(latest_tag) +except InvalidVersion: + sys.exit() + +gh: GitHub = GitHub(token=os.environ["GITHUB_TOKEN"]) +repo: Repository = gh.repository(*os.environ["GITHUB_REPOSITORY"].split('/', 1)) + +for milestone in repo.milestones(state="open"): + try: + milestone_version = Version(milestone.title) + except InvalidVersion: + continue + if milestone_version == current_version: + sys.exit(not milestone.update(state="closed")) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 401f455..4515b52 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -13,6 +13,7 @@ on: permissions: actions: write + issues: write contents: read jobs: @@ -21,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.5' strategy: fail-fast: False @@ -32,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-alpha.3", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-alpha.5", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 488db75..46f8247 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -14,6 +14,7 @@ on: permissions: actions: write + issues: write contents: read jobs: @@ -22,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.5' strategy: fail-fast: False @@ -33,7 +34,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-alpha.3", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-alpha.5", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ @@ -136,21 +137,21 @@ jobs: - name: Setup Python 🐍 uses: "actions/setup-python@v2" + if: startsWith(github.ref, 'refs/tags/') with: python-version: 3.8 - if: startsWith(github.ref, 'refs/tags/') - name: Install dependencies 🔧 + if: startsWith(github.ref, 'refs/tags/') run: | python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade tox - if: startsWith(github.ref, 'refs/tags/') - name: Build distributions 📦 + if: startsWith(github.ref, 'refs/tags/') run: | tox -e build - if: startsWith(github.ref, 'refs/tags/') - name: Upload distribution to PyPI 🚀 if: startsWith(github.ref, 'refs/tags/') @@ -159,3 +160,11 @@ jobs: user: __token__ password: ${{ secrets.PYPI_TOKEN }} skip_existing: true + + - name: Close milestone 🚪 + if: startsWith(github.ref, 'refs/tags/') + run: | + python -m pip install --upgrade github3.py packaging + python .github/milestones.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index f051e56..95f4eea 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -13,6 +13,7 @@ on: permissions: actions: write + issues: write contents: read jobs: @@ -21,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.5' strategy: fail-fast: False @@ -32,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-alpha.3", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-alpha.5", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cf8cf62..cca76eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,7 +67,7 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.1.10 + rev: v1.1.11 hooks: - id: remove-crlf - id: forbid-crlf diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index aca1e00..0000000 --- a/setup.cfg +++ /dev/null @@ -1,10 +0,0 @@ -# This file is managed by 'repo_helper'. -# You may add new sections, but any changes made to the following sections will be lost: -# * metadata -# * options -# * options.packages.find -# * mypy -# * options.entry_points - -[options.entry_points] -console_scripts = snippet-fmt=snippet_fmt.__main__:main diff --git a/tox.ini b/tox.ini index 5c8490d..4f028cb 100644 --- a/tox.ini +++ b/tox.ini @@ -28,9 +28,8 @@ envlist = skip_missing_interpreters = True isolated_build = True requires = - pip>=20.3.3 + pip>=21 tox-envlist>=0.2.1 - tox-pip-version>=0.0.7 [envlists] test = @@ -58,7 +57,6 @@ commands = [testenv:docs] setenv = SHOW_TODOS = 1 basepython = python3.8 -pip_version = pip>=21 changedir = {toxinidir}/doc-source deps = -r{toxinidir}/doc-source/requirements.txt commands = sphinx-build -M {env:SPHINX_BUILDER:html} . ./build {posargs} From 14ac557e0873906280bf53199e1473d5d9f66fb6 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 22 Mar 2022 11:37:56 +0000 Subject: [PATCH 18/57] Updated files with 'repo_helper'. (#14) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 4 ++-- .github/workflows/python_ci_macos.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 4515b52..0f6f07d 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.5' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.6' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-alpha.5", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-alpha.6", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 46f8247..7bfec8d 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.5' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.6' strategy: fail-fast: False @@ -34,7 +34,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-alpha.5", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-alpha.6", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 95f4eea..8208e74 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.5' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.6' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-alpha.5", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-alpha.6", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ From d48c241d271d1bcc0d3ea5ba6b48adb20c92be46 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Sun, 8 May 2022 14:03:26 +0000 Subject: [PATCH 19/57] Updated files with 'repo_helper'. (#15) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/stale.yml | 10 +++++----- .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 4 ++-- .github/workflows/python_ci_macos.yml | 4 ++-- .pre-commit-config.yaml | 6 +++--- justfile | 23 +++++++++++++++++++++++ tox.ini | 2 +- 7 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 justfile diff --git a/.github/stale.yml b/.github/stale.yml index e5625b7..bb7fa62 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -7,7 +7,7 @@ daysUntilStale: 180 # Number of days of inactivity before an Issue or Pull Request with the stale label is closed. # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 180 +daysUntilClose: false # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) onlyLabels: [] @@ -31,10 +31,10 @@ exemptAssignees: false staleLabel: stale # Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. +markComment: false +# This issue has been automatically marked as stale because it has not had +# recent activity. It will be closed if no further activity occurs. Thank you +# for your contributions. # Comment to post when removing the stale label. # unmarkComment: > diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 0f6f07d..1cb575e 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.6' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.7' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-alpha.6", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-alpha.7", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 7bfec8d..af754b9 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.6' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.7' strategy: fail-fast: False @@ -34,7 +34,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-alpha.6", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-alpha.7", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 8208e74..78abeb4 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.6' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.7' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-alpha.6", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-alpha.7", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cca76eb..3a996e9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ exclude: ^(tests/test_snippet_fmt_/.*\.rst|tests/example.rst)$ repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.4.2 + rev: v0.4.3 hooks: - id: reformat-pyproject @@ -67,7 +67,7 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.1.11 + rev: v1.1.13 hooks: - id: remove-crlf - id: forbid-crlf @@ -78,7 +78,7 @@ repos: - id: snippet-fmt - repo: https://github.com/python-formate/formate - rev: v0.4.9 + rev: v0.4.10 hooks: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ diff --git a/justfile b/justfile new file mode 100644 index 0000000..f3b215e --- /dev/null +++ b/justfile @@ -0,0 +1,23 @@ +default: lint + +pdf-docs: latex-docs + make -C doc-source/build/latex/ + +latex-docs: + SPHINX_BUILDER=latex tox -e docs + +unused-imports: + tox -e lint -- --select F401 + +incomplete-defs: + #!/usr/bin/env bash + tox -e mypy -- --disallow-incomplete-defs --disallow-untyped-defs | grep "Function is missing a .* annotation" || exit 0 + +vdiff: + git diff $(repo-helper show version -q)..HEAD + +bare-ignore: + greppy '# type:? *ignore(?!\[|\w)' -s + +lint: unused-imports incomplete-defs bare-ignore + tox -n qa diff --git a/tox.ini b/tox.ini index 4f028cb..b82fd27 100644 --- a/tox.ini +++ b/tox.ini @@ -107,7 +107,7 @@ basepython = python3.6 ignore_errors = True changedir = {toxinidir} deps = - mypy==0.931 + mypy==0.942 -r{toxinidir}/tests/requirements.txt commands = mypy snippet_fmt tests {posargs} From 7c78ac4a1ee0e40dc5bf5aa08c43884da28d3d5e Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Sun, 8 May 2022 17:25:01 +0100 Subject: [PATCH 20/57] Update docs. --- doc-source/_static/style.css | 4 ++++ doc-source/_templates/base.html | 1 - doc-source/api/config.rst | 1 + doc-source/api/formatters.rst | 1 + doc-source/api/snippet-fmt.rst | 1 + doc-source/conf.py | 7 +++++++ doc-source/requirements.txt | 1 + pyproject.toml | 5 +++-- repo_helper.yml | 6 ++++-- snippet_fmt/__init__.py | 3 +++ snippet_fmt/formatters.py | 2 ++ 11 files changed, 27 insertions(+), 5 deletions(-) diff --git a/doc-source/_static/style.css b/doc-source/_static/style.css index 7077a55..a6b8e4d 100644 --- a/doc-source/_static/style.css +++ b/doc-source/_static/style.css @@ -13,3 +13,7 @@ div.versionchanged ul, div.versionremoved ul { margin-left: 20px; margin-top: 0; } + +.longtable.autosummary { + width: 100%; +} diff --git a/doc-source/_templates/base.html b/doc-source/_templates/base.html index ffdc5ad..b101b24 100644 --- a/doc-source/_templates/base.html +++ b/doc-source/_templates/base.html @@ -2,5 +2,4 @@ {% extends "!base.html" %} {% block extrahead %} - {% endblock %} diff --git a/doc-source/api/config.rst b/doc-source/api/config.rst index cd3b9ea..522a977 100644 --- a/doc-source/api/config.rst +++ b/doc-source/api/config.rst @@ -2,4 +2,5 @@ :mod:`snippet_fmt.config` =========================== +.. autosummary-widths:: 3/10 .. automodule:: snippet_fmt.config diff --git a/doc-source/api/formatters.rst b/doc-source/api/formatters.rst index 7f98557..52115e2 100644 --- a/doc-source/api/formatters.rst +++ b/doc-source/api/formatters.rst @@ -2,4 +2,5 @@ :mod:`snippet_fmt.formatters` =============================== +.. autosummary-widths:: 4/10 .. automodule:: snippet_fmt.formatters diff --git a/doc-source/api/snippet-fmt.rst b/doc-source/api/snippet-fmt.rst index 7eae72e..ff23399 100644 --- a/doc-source/api/snippet-fmt.rst +++ b/doc-source/api/snippet-fmt.rst @@ -2,4 +2,5 @@ :mod:`snippet_fmt` ======================== +.. autosummary-widths:: 45/100 .. automodule:: snippet_fmt diff --git a/doc-source/conf.py b/doc-source/conf.py index b1a7a77..f184826 100644 --- a/doc-source/conf.py +++ b/doc-source/conf.py @@ -80,3 +80,10 @@ def setup(app): nitpicky = True toctree_plus_types.add("tconf") toml_spec_version = "0.5.0" +needspace_amount = r"5\baselineskip" +favicons = [{ + "rel": "icon", + "href": "https://python-formate.github.io/assets/formate.ico", + "sizes": "48x48", + "type": "image/vnd.microsoft.icon" + }] diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index 75aff01..45a6424 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -8,6 +8,7 @@ seed-intersphinx-mapping>=0.3.1 sphinx>=3.0.3 sphinx-copybutton>=0.2.12 sphinx-debuginfo>=0.1.0 +sphinx-favicon>=0.2 sphinx-licenseinfo>=0.1.1 sphinx-notfound-page>=0.7.1 sphinx-packaging>=0.1.0 diff --git a/pyproject.toml b/pyproject.toml index 8081a55..38ef88f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,6 +54,7 @@ extensions = [ "sphinx_toolbox.more_autosummary", "sphinx_toolbox.documentation_summary", "sphinx_toolbox.tweaks.param_dash", + "sphinxcontrib.toctree_plus", "sphinx_toolbox.tweaks.latex_layout", "sphinx_toolbox.tweaks.latex_toc", "sphinx.ext.intersphinx", @@ -64,7 +65,6 @@ extensions = [ "notfound.extension", "sphinx_copybutton", "sphinxcontrib.default_values", - "sphinxcontrib.toctree_plus", "sphinx_debuginfo", "sphinx_licenseinfo", "seed_intersphinx_mapping", @@ -72,7 +72,8 @@ extensions = [ "attr_utils.autoattrs", "sphinx_click", "sphinx_toolbox.pre_commit", - "sphinx_toolbox_experimental.autosummary_widths", + "sphinx_toolbox.more_autosummary.column_widths", + "sphinx-favicon", "sphinx_toolbox_experimental.missing_xref", "sphinx_packaging", ] diff --git a/repo_helper.yml b/repo_helper.yml index 8d62ccf..1cf731c 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -14,7 +14,6 @@ enable_conda: false use_whey: true min_coverage: 95 sphinx_html_theme: furo -preserve_custom_theme: true docs_fail_on_warning: true python_versions: @@ -42,7 +41,8 @@ extra_sphinx_extensions: - attr_utils.autoattrs - sphinx_click - sphinx_toolbox.pre_commit - - sphinx_toolbox_experimental.autosummary_widths + - sphinx_toolbox.more_autosummary.column_widths + - sphinx-favicon # - sphinx_toolbox_experimental.changelog - sphinx_toolbox_experimental.missing_xref - sphinx_packaging @@ -53,6 +53,8 @@ sphinx_conf_epilogue: - nitpicky = True - toctree_plus_types.add("tconf") - toml_spec_version = "0.5.0" + - needspace_amount = r"5\baselineskip" + - 'favicons = [{"rel": "icon", "href": "https://python-formate.github.io/assets/formate.ico", "sizes": "48x48", "type": "image/vnd.microsoft.icon"}]' exclude_files: - contributing diff --git a/snippet_fmt/__init__.py b/snippet_fmt/__init__.py index d0e76cc..fa57cd3 100644 --- a/snippet_fmt/__init__.py +++ b/snippet_fmt/__init__.py @@ -79,6 +79,9 @@ class RSTReformatter: :param filename: The filename to reformat. :param config: The ``snippet_fmt`` configuration, parsed from a TOML file (or similar). + + .. autosummary-widths:: 35/100 + .. latex:clearpage:: """ #: The filename being reformatted. diff --git a/snippet_fmt/formatters.py b/snippet_fmt/formatters.py index 55c6039..9def2c3 100644 --- a/snippet_fmt/formatters.py +++ b/snippet_fmt/formatters.py @@ -137,6 +137,8 @@ def format_ini(code: str, **config) -> str: :param \*\*config: The language-specific configuration. :returns: The original code unchanged. + + .. latex:clearpage:: """ parser = ConfigParser() From d571d1e9d18503b9a8556ba9d8e46570fc5aea83 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Sun, 8 May 2022 20:18:27 +0100 Subject: [PATCH 21/57] Remove whitespace. --- snippet_fmt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippet_fmt/__init__.py b/snippet_fmt/__init__.py index fa57cd3..2ca6dee 100644 --- a/snippet_fmt/__init__.py +++ b/snippet_fmt/__init__.py @@ -79,7 +79,7 @@ class RSTReformatter: :param filename: The filename to reformat. :param config: The ``snippet_fmt`` configuration, parsed from a TOML file (or similar). - + .. autosummary-widths:: 35/100 .. latex:clearpage:: """ From 25925cdb43f6e824a6d8f5fc98ff4b63255e1615 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 16:18:26 +0100 Subject: [PATCH 22/57] [repo-helper] Configuration Update (#17) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 4 ++-- .github/workflows/python_ci_macos.yml | 4 ++-- .pre-commit-config.yaml | 6 +++--- doc-source/conf.py | 3 ++- justfile | 3 +-- tox.ini | 11 +++++++++++ 7 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 1cb575e..3b00e46 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.7' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-beta.3' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-alpha.7", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-beta.3", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index af754b9..b500048 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.7' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-beta.3' strategy: fail-fast: False @@ -34,7 +34,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-alpha.7", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-beta.3", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 78abeb4..8762485 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.7' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-beta.3' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-alpha.7", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-beta.3", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a996e9..6d74d03 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ exclude: ^(tests/test_snippet_fmt_/.*\.rst|tests/example.rst)$ repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.4.3 + rev: v0.6.1 hooks: - id: reformat-pyproject @@ -40,7 +40,7 @@ repos: - id: bind-requirements - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.1.8 + rev: v0.2.1 hooks: - id: ensure-dunder-all files: ^snippet_fmt/.*\.py$ @@ -67,7 +67,7 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.1.13 + rev: v1.2.0 hooks: - id: remove-crlf - id: forbid-crlf diff --git a/doc-source/conf.py b/doc-source/conf.py index f184826..57852a5 100644 --- a/doc-source/conf.py +++ b/doc-source/conf.py @@ -27,7 +27,8 @@ slug = re.sub(r'\W+', '-', project.lower()) release = version = config.version -todo_include_todos = bool(os.environ.get("SHOW_TODOS", 0)) +sphinx_builder = os.environ.get("SPHINX_BUILDER", "html").lower() +todo_include_todos = int(os.environ.get("SHOW_TODOS", 0)) and sphinx_builder != "latex" intersphinx_mapping = { "python": ("https://docs.python.org/3/", None), diff --git a/justfile b/justfile index f3b215e..e8ed871 100644 --- a/justfile +++ b/justfile @@ -10,8 +10,7 @@ unused-imports: tox -e lint -- --select F401 incomplete-defs: - #!/usr/bin/env bash - tox -e mypy -- --disallow-incomplete-defs --disallow-untyped-defs | grep "Function is missing a .* annotation" || exit 0 + tox -e lint -- --select MAN vdiff: git diff $(repo-helper show version -q)..HEAD diff --git a/tox.ini b/tox.ini index b82fd27..55da01b 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,7 @@ # * testenv:docs # * testenv:build # * testenv:lint +# * testenv:perflint # * testenv:mypy # * testenv:pyup # * testenv:coverage @@ -56,6 +57,7 @@ commands = [testenv:docs] setenv = SHOW_TODOS = 1 +passenv = SPHINX_BUILDER basepython = python3.8 changedir = {toxinidir}/doc-source deps = -r{toxinidir}/doc-source/requirements.txt @@ -97,11 +99,20 @@ deps = git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git git+https://github.com/domdfcoding/flake8-rst-docstrings.git git+https://github.com/python-formate/flake8-unused-arguments.git@magic-methods + git+https://github.com/python-formate/flake8-missing-annotations.git pydocstyle>=6.0.0 pygments>=2.7.1 importlib_metadata<4.5.0; python_version<'3.8' commands = python3 -m flake8_rst_docstrings_sphinx snippet_fmt tests --allow-toolbox {posargs} +[testenv:perflint] +basepython = python3.6 +changedir = {toxinidir} +ignore_errors = True +skip_install = True +deps = perflint +commands = python3 -m perflint snippet_fmt {posargs} + [testenv:mypy] basepython = python3.6 ignore_errors = True From 74e25d41f7507f91bd93819dd9b65a499af69669 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Tue, 7 Jun 2022 22:50:38 +0100 Subject: [PATCH 23/57] Lint --- snippet_fmt/__init__.py | 6 +++--- snippet_fmt/__main__.py | 6 +++--- snippet_fmt/config.py | 4 ++-- snippet_fmt/formatters.py | 6 +++--- tests/test_snippet_fmt.py | 9 ++++----- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/snippet_fmt/__init__.py b/snippet_fmt/__init__.py index 2ca6dee..6f5644e 100644 --- a/snippet_fmt/__init__.py +++ b/snippet_fmt/__init__.py @@ -56,7 +56,7 @@ __version__: str = "0.1.4" __email__: str = "dominic@davis-foster.co.uk" -__all__ = ["CodeBlockError", "RSTReformatter", "reformat_file"] +__all__ = ("CodeBlockError", "RSTReformatter", "reformat_file") TRAILING_NL_RE = re.compile(r'\n+\Z', re.MULTILINE) @@ -227,7 +227,7 @@ def load_extra_formatters(self) -> None: for distro_config, _ in entrypoints.iter_files_distros(): if group in distro_config: for name, epstr in distro_config[group].items(): - with contextlib.suppress(entrypoints.BadEntryPoint, ImportError): + with contextlib.suppress(entrypoints.BadEntryPoint, ImportError): # pylint: disable=W8205 # TODO: show warning for bad entry point if verbose, or "strict"? ep = entrypoints.EntryPoint.from_string(epstr, name) self._formatters[name] = ep.load() @@ -237,7 +237,7 @@ def reformat_file( filename: PathLike, config: SnippetFmtConfigDict, colour: ColourTrilean = None, - ): + ) -> int: """ Reformat the given reStructuredText file, and show the diff if changes were made. diff --git a/snippet_fmt/__main__.py b/snippet_fmt/__main__.py index 2c3e613..c016770 100644 --- a/snippet_fmt/__main__.py +++ b/snippet_fmt/__main__.py @@ -38,7 +38,7 @@ from consolekit.tracebacks import handle_tracebacks, traceback_option from domdf_python_tools.typing import PathLike -__all__ = ["main"] +__all__ = ("main", ) @flag_option("--diff", "show_diff", help="Show a diff of changes made") @@ -71,7 +71,7 @@ def main( verbose: bool = False, show_traceback: bool = False, show_diff: bool = False, - ): + ) -> None: """ Reformat code snippets in the given reStructuredText files. """ @@ -97,7 +97,7 @@ def main( for path in filename: for pattern in exclude or []: - if re.match(fnmatch.translate(pattern), str(path)): + if re.match(fnmatch.translate(pattern), str(path)): # pylint: disable=loop-invariant-statement continue path = PathPlus(path).abspath() diff --git a/snippet_fmt/config.py b/snippet_fmt/config.py index 86add08..840032a 100644 --- a/snippet_fmt/config.py +++ b/snippet_fmt/config.py @@ -34,7 +34,7 @@ from domdf_python_tools.typing import PathLike from typing_extensions import TypedDict -__all__ = ["SnippetFmtConfigDict", "load_toml"] +__all__ = ("SnippetFmtConfigDict", "load_toml") class SnippetFmtConfigDict(TypedDict): @@ -98,7 +98,7 @@ def load_toml(filename: PathLike) -> SnippetFmtConfigDict: if "languages" in config: for language, lang_config in config.get("languages", {}).items(): - snippet_fmt_config["languages"][language] = lang_config + snippet_fmt_config["languages"][language] = lang_config # pylint: disable=loop-invariant-statement else: snippet_fmt_config["languages"] = { "python": {}, diff --git a/snippet_fmt/formatters.py b/snippet_fmt/formatters.py index 9def2c3..5964505 100644 --- a/snippet_fmt/formatters.py +++ b/snippet_fmt/formatters.py @@ -32,7 +32,7 @@ import os from configparser import ConfigParser from io import StringIO -from typing import Any, Callable, Optional, TypeVar +from typing import Any, Optional # 3rd party import dom_toml @@ -40,14 +40,14 @@ import formate from domdf_python_tools.paths import PathPlus -__all__ = [ +__all__ = ( "Formatter", "format_toml", "format_ini", "format_json", "format_python", "noformat", - ] + ) # 3rd party from typing_extensions import Protocol diff --git a/tests/test_snippet_fmt.py b/tests/test_snippet_fmt.py index 8e3646e..c4ff36c 100644 --- a/tests/test_snippet_fmt.py +++ b/tests/test_snippet_fmt.py @@ -1,6 +1,5 @@ # stdlib -import re -from typing import Dict, List, Union, no_type_check +from typing import Dict, Iterator, List, Union, no_type_check # 3rd party import dom_toml @@ -69,7 +68,7 @@ @pytest.fixture() -def custom_entry_point(monkeypatch): +def custom_entry_point(monkeypatch) -> Iterator: with TemporaryPathPlus() as tmpdir: monkeypatch.syspath_prepend(str(tmpdir)) @@ -114,6 +113,7 @@ def test_snippet_fmt( advanced_file_regression.check_file(tmp_pathplus / filename) check_out(capsys.readouterr(), tmp_pathplus, advanced_data_regression) + @pytest.mark.usefixtures("custom_entry_point") @filenames def test_snippet_fmt_custom_entry_point( self, @@ -122,7 +122,6 @@ def test_snippet_fmt_custom_entry_point( advanced_file_regression: AdvancedFileRegressionFixture, advanced_data_regression: AdvancedDataRegressionFixture, capsys, - custom_entry_point ): languages = {"python3": {"reformat": True}} @@ -191,7 +190,7 @@ def check_out( result: Union[Result, CaptureResult[str]], tmpdir: PathPlus, advanced_data_regression: AdvancedDataRegressionFixture, - ): + ) -> None: if hasattr(result, "stdout"): stdout = result.stdout From da4e44db287c79625f63e2cbcf483de7a8f11fb6 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 16 Aug 2022 16:05:26 +0000 Subject: [PATCH 24/57] [repo-helper] Configuration Update (#18) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/mypy.yml | 2 +- .github/workflows/python_ci.yml | 6 +++--- .github/workflows/python_ci_linux.yml | 6 +++--- .github/workflows/python_ci_macos.yml | 6 +++--- .pre-commit-config.yaml | 10 +++++----- tox.ini | 9 +++++---- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 5a7324b..db8ab06 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -47,7 +47,7 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv + python -m pip install --upgrade tox virtualenv!=20.16.0 - name: "Run mypy" if: steps.changes.outputs.code == 'true' diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 3b00e46..1816c85 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-beta.3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-rc.1' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-beta.3", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-rc.1", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ @@ -62,7 +62,7 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv + python -m pip install --upgrade tox virtualenv!=20.16.0 - name: "Run Tests for Python ${{ matrix.config.python-version }}" if: steps.setup-python.outcome == 'success' diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index b500048..7f626a7 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-beta.3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-rc.1' strategy: fail-fast: False @@ -34,7 +34,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-beta.3", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-rc.1", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ @@ -63,7 +63,7 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv + python -m pip install --upgrade tox virtualenv!=20.16.0 python -m pip install --upgrade coverage_pyver_pragma - name: "Run Tests for Python ${{ matrix.config.python-version }}" diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 8762485..def0321 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-beta.3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-rc.1' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-beta.3", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11.0-rc.1", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ @@ -62,7 +62,7 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv + python -m pip install --upgrade tox virtualenv!=20.16.0 - name: "Run Tests for Python ${{ matrix.config.python-version }}" if: steps.setup-python.outcome == 'success' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6d74d03..2d723a1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ exclude: ^(tests/test_snippet_fmt_/.*\.rst|tests/example.rst)$ repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.6.1 + rev: v0.7.0 hooks: - id: reformat-pyproject @@ -30,7 +30,7 @@ repos: - id: end-of-file-fixer - repo: https://github.com/domdfcoding/pre-commit-hooks - rev: v0.3.0 + rev: v0.4.0 hooks: - id: requirements-txt-sorter args: @@ -40,13 +40,13 @@ repos: - id: bind-requirements - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.2.1 + rev: v0.2.2 hooks: - id: ensure-dunder-all files: ^snippet_fmt/.*\.py$ - repo: https://github.com/domdfcoding/flake2lint - rev: v0.4.1 + rev: v0.4.2 hooks: - id: flake2lint @@ -84,7 +84,7 @@ repos: exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ - repo: https://github.com/domdfcoding/dep_checker - rev: v0.6.2 + rev: v0.7.0 hooks: - id: dep_checker args: diff --git a/tox.ini b/tox.ini index 55da01b..9f36444 100644 --- a/tox.ini +++ b/tox.ini @@ -29,8 +29,9 @@ envlist = skip_missing_interpreters = True isolated_build = True requires = - pip>=21 + pip>=21,!=22.2 tox-envlist>=0.2.1 + virtualenv!=20.16.0 [envlists] test = @@ -81,15 +82,15 @@ changedir = {toxinidir} ignore_errors = True skip_install = True deps = - flake8>=3.8.2 + flake8>=3.8.2,<5 flake8-2020>=1.6.0 flake8-builtins>=1.5.3 flake8-docstrings>=1.5.0 flake8-dunder-all>=0.1.1 flake8-encodings>=0.1.0 flake8-github-actions>=0.1.0 - flake8-noqa>=1.1.0 - flake8-pyi>=20.10.0 + flake8-noqa>=1.1.0,<=1.2.2 + flake8-pyi>=20.10.0,<=22.8.0 flake8-pytest-style>=1.3.0 flake8-quotes>=3.3.0 flake8-slots>=0.1.0 From 57aa7954860b0e500c4404e0fdab60e89fbf3f58 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Sat, 3 Sep 2022 07:04:30 +0100 Subject: [PATCH 25/57] Updated files with 'repo_helper'. (#19) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/flake8.yml | 2 +- .pre-commit-config.yaml | 2 +- README.rst | 4 ++-- doc-source/index.rst | 4 ++-- tox.ini | 2 ++ 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 84e9436..4b47d24 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -16,7 +16,7 @@ permissions: jobs: Run: name: "Flake8" - runs-on: "ubuntu-18.04" + runs-on: "ubuntu-20.04" steps: - name: Checkout 🛎️ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2d723a1..c5c84d5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,7 +67,7 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.2.0 + rev: v1.3.1 hooks: - id: remove-crlf - id: forbid-crlf diff --git a/README.rst b/README.rst index 763a789..0d298ee 100644 --- a/README.rst +++ b/README.rst @@ -56,8 +56,8 @@ snippet-fmt :target: https://github.com/python-formate/snippet-fmt/actions?query=workflow%3A%22mypy%22 :alt: mypy status -.. |requires| image:: https://dependency-dash.herokuapp.com/github/python-formate/snippet-fmt/badge.svg - :target: https://dependency-dash.herokuapp.com/github/python-formate/snippet-fmt/ +.. |requires| image:: https://dependency-dash.repo-helper.uk/github/python-formate/snippet-fmt/badge.svg + :target: https://dependency-dash.repo-helper.uk/github/python-formate/snippet-fmt/ :alt: Requirements Status .. |coveralls| image:: https://img.shields.io/coveralls/github/python-formate/snippet-fmt/master?logo=coveralls diff --git a/doc-source/index.rst b/doc-source/index.rst index e7ac261..b16155e 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -58,8 +58,8 @@ snippet-fmt :workflow: mypy :alt: mypy status - .. |requires| image:: https://dependency-dash.herokuapp.com/github/python-formate/snippet-fmt/badge.svg - :target: https://dependency-dash.herokuapp.com/github/python-formate/snippet-fmt/ + .. |requires| image:: https://dependency-dash.repo-helper.uk/github/python-formate/snippet-fmt/badge.svg + :target: https://dependency-dash.repo-helper.uk/github/python-formate/snippet-fmt/ :alt: Requirements Status .. |coveralls| coveralls-shield:: diff --git a/tox.ini b/tox.ini index 9f36444..de32783 100644 --- a/tox.ini +++ b/tox.ini @@ -48,6 +48,7 @@ cov = py36-click7, coverage setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 + SETUPTOOLS_USE_DISTUTILS=stdlib deps = -r{toxinidir}/tests/requirements.txt click7: click~=7.0 @@ -140,6 +141,7 @@ passenv = COV_PYTHON_VERSION COV_PLATFORM COV_PYTHON_IMPLEMENTATION + * changedir = {toxinidir} deps = coverage>=5 From a0dc2f156a4ea2527158488d8477531031801466 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 10:39:16 +0000 Subject: [PATCH 26/57] Updated files with 'repo_helper'. (#20) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/docs_test_action.yml | 2 +- .github/workflows/flake8.yml | 6 +++--- .github/workflows/mypy.yml | 6 +++--- .github/workflows/python_ci.yml | 8 ++++---- .github/workflows/python_ci_linux.yml | 16 ++++++++-------- .github/workflows/python_ci_macos.yml | 8 ++++---- .pre-commit-config.yaml | 3 +++ pyproject.toml | 2 +- tox.ini | 14 +++++++------- 9 files changed, 34 insertions(+), 31 deletions(-) diff --git a/.github/workflows/docs_test_action.yml b/.github/workflows/docs_test_action.yml index bd2510e..b09bde3 100644 --- a/.github/workflows/docs_test_action.yml +++ b/.github/workflows/docs_test_action.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" - name: Check for changed files uses: dorny/paths-filter@v2 diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 4b47d24..2761d45 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" - name: Check for changed files uses: dorny/paths-filter@v2 @@ -33,9 +33,9 @@ jobs: - name: Setup Python 🐍 if: steps.changes.outputs.code == 'true' - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v4" with: - python-version: "3.6" + python-version: "3.8" - name: Install dependencies 🔧 if: steps.changes.outputs.code == 'true' diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index db8ab06..6caf60d 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" - name: Check for changed files uses: dorny/paths-filter@v2 @@ -38,9 +38,9 @@ jobs: - name: Setup Python 🐍 if: steps.changes.outputs.code == 'true' - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v4" with: - python-version: "3.6" + python-version: "3.8" - name: Install dependencies 🔧 run: | diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 1816c85..ad7e059 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-rc.1' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11' strategy: fail-fast: False @@ -33,11 +33,11 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-rc.1", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -52,7 +52,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v4" with: python-version: "${{ matrix.config.python-version }}" diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 7f626a7..8e6328a 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-rc.1' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11' strategy: fail-fast: False @@ -34,11 +34,11 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-rc.1", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -53,7 +53,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v4" with: python-version: "${{ matrix.config.python-version }}" @@ -83,10 +83,10 @@ jobs: runs-on: "ubuntu-20.04" steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" - name: Setup Python 🐍 - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v4" with: python-version: 3.8 @@ -132,11 +132,11 @@ jobs: runs-on: "ubuntu-20.04" steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" if: startsWith(github.ref, 'refs/tags/') - name: Setup Python 🐍 - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v4" if: startsWith(github.ref, 'refs/tags/') with: python-version: 3.8 diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index def0321..b96a8c1 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-rc.1' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11' strategy: fail-fast: False @@ -33,11 +33,11 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11.0-rc.1", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11", testenvs: "py311-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -52,7 +52,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v4" with: python-version: "${{ matrix.config.python-version }}" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c5c84d5..5eb4d2f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,6 +3,9 @@ exclude: ^(tests/test_snippet_fmt_/.*\.rst|tests/example.rst)$ +ci: + autoupdate_schedule: quarterly + repos: - repo: https://github.com/repo-helper/pyproject-parser rev: v0.7.0 diff --git a/pyproject.toml b/pyproject.toml index 38ef88f..fac9457 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -127,7 +127,7 @@ autodoc_exclude_members = [ ] [tool.mypy] -python_version = "3.6" +python_version = "3.8" namespace_packages = true check_untyped_defs = true warn_unused_ignores = true diff --git a/tox.ini b/tox.ini index de32783..b879abf 100644 --- a/tox.ini +++ b/tox.ini @@ -42,7 +42,7 @@ test = py310-click{7,8} py311-dev-click{7,8} qa = mypy, lint -cov = py36-click7, coverage +cov = py38-click7, coverage [testenv] setenv = @@ -78,7 +78,7 @@ commands = check-wheel-contents dist/ [testenv:lint] -basepython = python3.6 +basepython = python3.8 changedir = {toxinidir} ignore_errors = True skip_install = True @@ -108,7 +108,7 @@ deps = commands = python3 -m flake8_rst_docstrings_sphinx snippet_fmt tests --allow-toolbox {posargs} [testenv:perflint] -basepython = python3.6 +basepython = python3.8 changedir = {toxinidir} ignore_errors = True skip_install = True @@ -116,16 +116,16 @@ deps = perflint commands = python3 -m perflint snippet_fmt {posargs} [testenv:mypy] -basepython = python3.6 +basepython = python3.8 ignore_errors = True changedir = {toxinidir} deps = - mypy==0.942 + mypy==0.971 -r{toxinidir}/tests/requirements.txt commands = mypy snippet_fmt tests {posargs} [testenv:pyup] -basepython = python3.6 +basepython = python3.8 skip_install = True ignore_errors = True changedir = {toxinidir} @@ -133,7 +133,7 @@ deps = pyupgrade-directories commands = pyup_dirs snippet_fmt tests --py36-plus --recursive [testenv:coverage] -basepython = python3.6 +basepython = python3.8 skip_install = True ignore_errors = True whitelist_externals = /bin/bash From 2eb2a9761afa948feefd306371702fc3e8b93743 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Fri, 9 Dec 2022 17:59:40 +0000 Subject: [PATCH 27/57] [repo-helper] Configuration Update (#21) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/flake8.yml | 2 +- .github/workflows/mypy.yml | 2 +- .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 10 +++++----- .github/workflows/python_ci_macos.yml | 4 ++-- tox.ini | 1 + 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 2761d45..8221173 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -43,7 +43,7 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install tox + python -m pip install tox~=3.0 - name: "Run Flake8" if: steps.changes.outputs.code == 'true' diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 6caf60d..9b28b5f 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -47,7 +47,7 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv!=20.16.0 + python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 - name: "Run mypy" if: steps.changes.outputs.code == 'true' diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index ad7e059..354b4e4 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -62,14 +62,14 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv!=20.16.0 + python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 - name: "Run Tests for Python ${{ matrix.config.python-version }}" if: steps.setup-python.outcome == 'success' run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 8e6328a..166864c 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -63,7 +63,7 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv!=20.16.0 + python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 python -m pip install --upgrade coverage_pyver_pragma - name: "Run Tests for Python ${{ matrix.config.python-version }}" @@ -71,7 +71,7 @@ jobs: run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" @@ -96,7 +96,7 @@ jobs: python -m pip install --upgrade "coveralls>=3.0.0" coverage_pyver_pragma - name: "Download Coverage 🪂" - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: path: coverage @@ -114,7 +114,7 @@ jobs: - name: "Upload Combined Coverage Artefact 🚀" if: ${{ steps.show.outcome != 'failure' }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: "combined-coverage" path: .coverage @@ -145,7 +145,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') run: | python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox + python -m pip install --upgrade tox~=3.0 - name: Build distributions 📦 if: startsWith(github.ref, 'refs/tags/') diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index b96a8c1..59792cd 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -62,14 +62,14 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv!=20.16.0 + python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 - name: "Run Tests for Python ${{ matrix.config.python-version }}" if: steps.setup-python.outcome == 'success' run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" diff --git a/tox.ini b/tox.ini index b879abf..c880030 100644 --- a/tox.ini +++ b/tox.ini @@ -31,6 +31,7 @@ isolated_build = True requires = pip>=21,!=22.2 tox-envlist>=0.2.1 + tox~=3.0 virtualenv!=20.16.0 [envlists] From e556d0305d8cf5afe205f50790d69f9973c43215 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Fri, 10 Feb 2023 12:03:10 +0000 Subject: [PATCH 28/57] Updated files with 'repo_helper'. (#22) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- README.rst | 2 +- doc-source/index.rst | 2 +- tox.ini | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 0d298ee..8d4b384 100644 --- a/README.rst +++ b/README.rst @@ -99,7 +99,7 @@ snippet-fmt :target: https://github.com/python-formate/snippet-fmt/commit/master :alt: GitHub last commit -.. |maintained| image:: https://img.shields.io/maintenance/yes/2022 +.. |maintained| image:: https://img.shields.io/maintenance/yes/2023 :alt: Maintenance .. |pypi-downloads| image:: https://img.shields.io/pypi/dm/snippet-fmt diff --git a/doc-source/index.rst b/doc-source/index.rst index b16155e..012c357 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -104,7 +104,7 @@ snippet-fmt :last-commit: :alt: GitHub last commit - .. |maintained| maintained-shield:: 2022 + .. |maintained| maintained-shield:: 2023 :alt: Maintenance .. |pypi-downloads| pypi-shield:: diff --git a/tox.ini b/tox.ini index c880030..9e8ed14 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,7 @@ # * tox # * envlists # * testenv +# * testenv:py312-dev # * testenv:docs # * testenv:build # * testenv:lint From 0a89647a97e9f3612518b93a999d2f93bda54316 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Mon, 21 Aug 2023 16:56:41 +0100 Subject: [PATCH 29/57] Fix sphinx_favicon extension name --- pyproject.toml | 2 +- repo_helper.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fac9457..60be109 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ extensions = [ "sphinx_click", "sphinx_toolbox.pre_commit", "sphinx_toolbox.more_autosummary.column_widths", - "sphinx-favicon", + "sphinx_favicon", "sphinx_toolbox_experimental.missing_xref", "sphinx_packaging", ] diff --git a/repo_helper.yml b/repo_helper.yml index 1cf731c..4b17e76 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -42,7 +42,7 @@ extra_sphinx_extensions: - sphinx_click - sphinx_toolbox.pre_commit - sphinx_toolbox.more_autosummary.column_widths - - sphinx-favicon + - sphinx_favicon # - sphinx_toolbox_experimental.changelog - sphinx_toolbox_experimental.missing_xref - sphinx_packaging From e1e231389c52dbdca9610880365e4658488c3901 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Mon, 21 Aug 2023 16:54:48 +0000 Subject: [PATCH 30/57] Updated files with 'repo_helper'. (#23) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 12 ++++++------ .readthedocs.yml | 10 +++++++--- doc-source/requirements.txt | 16 ++++++++-------- tox.ini | 14 +++++++++++++- 4 files changed, 34 insertions(+), 18 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5eb4d2f..82c1cd2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ ci: repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.7.0 + rev: v0.9.0 hooks: - id: reformat-pyproject @@ -43,7 +43,7 @@ repos: - id: bind-requirements - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.2.2 + rev: v0.3.0 hooks: - id: ensure-dunder-all files: ^snippet_fmt/.*\.py$ @@ -54,7 +54,7 @@ repos: - id: flake2lint - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.9.0 + rev: v1.10.0 hooks: - id: python-no-eval - id: rst-backticks @@ -70,7 +70,7 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.3.1 + rev: v1.5.1 hooks: - id: remove-crlf - id: forbid-crlf @@ -81,13 +81,13 @@ repos: - id: snippet-fmt - repo: https://github.com/python-formate/formate - rev: v0.4.10 + rev: v0.5.0 hooks: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ - repo: https://github.com/domdfcoding/dep_checker - rev: v0.7.0 + rev: v0.7.1 hooks: - id: dep_checker args: diff --git a/.readthedocs.yml b/.readthedocs.yml index 41d2e57..4a2ec5f 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -9,9 +9,13 @@ formats: - pdf - htmlzip python: - version: 3.8 install: - requirements: requirements.txt - requirements: doc-source/requirements.txt - - method: pip - path: . +build: + os: ubuntu-20.04 + tools: + python: '3.9' + jobs: + post_create_environment: + - pip install . diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index 45a6424..e76c14d 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -1,20 +1,20 @@ git+https://github.com/domdfcoding/sphinx-click.git git+https://github.com/sphinx-toolbox/sphinx-toolbox-experimental.git -default-values>=0.5.0 -extras-require>=0.2.0 +default-values>=0.6.0 +extras-require>=0.5.0 furo>=2020.11.19b18 -html-section>=0.1.0 -seed-intersphinx-mapping>=0.3.1 +html-section>=0.3.0 +seed-intersphinx-mapping>=1.2.2 sphinx>=3.0.3 sphinx-copybutton>=0.2.12 -sphinx-debuginfo>=0.1.0 +sphinx-debuginfo>=0.2.2 sphinx-favicon>=0.2 -sphinx-licenseinfo>=0.1.1 +sphinx-licenseinfo>=0.3.1 sphinx-notfound-page>=0.7.1 sphinx-packaging>=0.1.0 sphinx-prompt>=1.1.0 sphinx-pyproject>=0.1.0 sphinx-tabs>=1.1.13 -sphinx-toolbox>=2.13.0b3 +sphinx-toolbox>=3.5.0 sphinxemoji>=0.1.6 -toctree-plus>=0.5.0 +toctree-plus>=0.6.1 diff --git a/tox.ini b/tox.ini index 9e8ed14..1b325d8 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,7 @@ # * tox # * envlists # * testenv +# * testenv:.package # * testenv:py312-dev # * testenv:docs # * testenv:build @@ -59,6 +60,11 @@ commands = python --version python -m pytest --cov=snippet_fmt -r aR tests/ {posargs} +[testenv:.package] +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + [testenv:docs] setenv = SHOW_TODOS = 1 passenv = SPHINX_BUILDER @@ -68,12 +74,17 @@ deps = -r{toxinidir}/doc-source/requirements.txt commands = sphinx-build -M {env:SPHINX_BUILDER:html} . ./build {posargs} [testenv:build] +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + PIP_PREFER_BINARY=1 skip_install = True changedir = {toxinidir} deps = build[virtualenv]>=0.3.1 check-wheel-contents>=0.1.0 twine>=3.2.0 + cryptography<40; implementation_name == "pypy" and python_version <= "3.7" commands = python -m build --sdist --wheel "{toxinidir}" twine check dist/*.tar.gz dist/*.whl @@ -155,7 +166,7 @@ commands = [flake8] max-line-length = 120 -select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 NQA001 NQA002 NQA003 NQA004 NQA005 NQA102 NQA103 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002 +select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 NQA001 NQA002 NQA003 NQA004 NQA005 NQA102 NQA103 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002 extend-exclude = doc-source,old,build,dist,__pkginfo__.py,setup.py,venv rst-directives = TODO @@ -183,6 +194,7 @@ plugins = coverage_pyver_pragma [coverage:report] fail_under = 95 +show_missing = True exclude_lines = raise AssertionError raise NotImplementedError From 5cb694a20e3a02bd20400e2a21e67a3470e90158 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Mon, 20 Nov 2023 11:59:08 +0000 Subject: [PATCH 31/57] Test on newer Python versions --- .github/workflows/python_ci.yml | 6 ++++-- .github/workflows/python_ci_linux.yml | 6 ++++-- .github/workflows/python_ci_macos.yml | 6 ++++-- pyproject.toml | 2 +- repo_helper.yml | 4 +++- tox.ini | 30 +++++++++++++++++++++++++-- 6 files changed, 44 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 354b4e4..b6472e4 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.1' strategy: fail-fast: False @@ -33,7 +33,9 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} + - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} + - {python-version: "3.13.0-alpha.1", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 166864c..793eb05 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.1' strategy: fail-fast: False @@ -34,7 +34,9 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} + - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} + - {python-version: "3.13.0-alpha.1", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 59792cd..603283a 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.1' strategy: fail-fast: False @@ -33,7 +33,9 @@ jobs: - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11", testenvs: "py311-dev-click{7,8},build", experimental: True} + - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} + - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} + - {python-version: "3.13.0-alpha.1", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/pyproject.toml b/pyproject.toml index 60be109..b0311ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ base-classifiers = [ "Intended Audience :: Developers", "Typing :: Typed", ] -python-versions = [ "3.6", "3.7", "3.8", "3.9", "3.10",] +python-versions = [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12",] python-implementations = [ "CPython",] platforms = [ "Windows", "macOS", "Linux",] license-key = "MIT" diff --git a/repo_helper.yml b/repo_helper.yml index 4b17e76..277b9d0 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -22,7 +22,9 @@ python_versions: - '3.8' - '3.9' - "3.10" - - 3.11-dev + - "3.11" + - "3.12" + - 3.13-dev keywords: - formatting diff --git a/tox.ini b/tox.ini index 1b325d8..90482e2 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,9 @@ # * envlists # * testenv # * testenv:.package +# * testenv:py313-dev # * testenv:py312-dev +# * testenv:py312 # * testenv:docs # * testenv:build # * testenv:lint @@ -25,7 +27,9 @@ envlist = py38-click{7,8} py39-click{7,8} py310-click{7,8} - py311-dev-click{7,8} + py311-click{7,8} + py312-click{7,8} + py313-dev-click{7,8} mypy build skip_missing_interpreters = True @@ -43,7 +47,9 @@ test = py38-click{7,8} py39-click{7,8} py310-click{7,8} - py311-dev-click{7,8} + py311-click{7,8} + py312-click{7,8} + py313-dev-click{7,8} qa = mypy, lint cov = py38-click7, coverage @@ -65,6 +71,16 @@ setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 +[testenv:py313-dev] +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + +[testenv:py312] +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + [testenv:docs] setenv = SHOW_TODOS = 1 passenv = SPHINX_BUILDER @@ -216,3 +232,13 @@ filterwarnings = error ignore:lib2to3 package is deprecated and may not be able to parse Python 3.10+:DeprecationWarning ignore:lib2to3 package is deprecated and may not be able to parse Python 3.10+:PendingDeprecationWarning + +[testenv:py312-click{7,8}] +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + +[testenv:py313-dev-click{7,8}] +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 From 8276e1bfaab004ca82b01aa17a24397b2ae0a974 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Wed, 22 Nov 2023 11:31:03 +0000 Subject: [PATCH 32/57] Lint --- snippet_fmt/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/snippet_fmt/__init__.py b/snippet_fmt/__init__.py index 6f5644e..71f6230 100644 --- a/snippet_fmt/__init__.py +++ b/snippet_fmt/__init__.py @@ -38,7 +38,7 @@ # 3rd party import click -import entrypoints # type: ignore +import entrypoints # type: ignore[import] from consolekit.terminal_colours import ColourTrilean, resolve_color_default from consolekit.utils import coloured_diff from domdf_python_tools.paths import PathPlus @@ -73,6 +73,9 @@ class CodeBlockError(NamedTuple): exc: Exception +# TODO: reformatter for docstrings + + class RSTReformatter: """ Reformat code snippets in a reStructuredText file. From 2eb379370ac15d40e6540e1fda3a0bf3f9f870bf Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Wed, 22 Nov 2023 11:31:30 +0000 Subject: [PATCH 33/57] Bump version v0.1.4 -> v0.1.5 --- .bumpversion.cfg | 2 +- README.rst | 2 +- doc-source/index.rst | 2 +- doc-source/usage.rst | 2 +- pyproject.toml | 2 +- repo_helper.yml | 2 +- snippet_fmt/__init__.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 5448bb2..bd34923 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.4 +current_version = 0.1.5 commit = True tag = True diff --git a/README.rst b/README.rst index 8d4b384..57ca7c8 100644 --- a/README.rst +++ b/README.rst @@ -91,7 +91,7 @@ snippet-fmt .. |language| image:: https://img.shields.io/github/languages/top/python-formate/snippet-fmt :alt: GitHub top language -.. |commits-since| image:: https://img.shields.io/github/commits-since/python-formate/snippet-fmt/v0.1.4 +.. |commits-since| image:: https://img.shields.io/github/commits-since/python-formate/snippet-fmt/v0.1.5 :target: https://github.com/python-formate/snippet-fmt/pulse :alt: GitHub commits since tagged version diff --git a/doc-source/index.rst b/doc-source/index.rst index 012c357..686e48c 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -97,7 +97,7 @@ snippet-fmt :alt: GitHub top language .. |commits-since| github-shield:: - :commits-since: v0.1.4 + :commits-since: v0.1.5 :alt: GitHub commits since tagged version .. |commits-latest| github-shield:: diff --git a/doc-source/usage.rst b/doc-source/usage.rst index ea1b962..e1dfe21 100644 --- a/doc-source/usage.rst +++ b/doc-source/usage.rst @@ -22,7 +22,7 @@ To do so, add the following to your `.pre-commit-config.yaml `_ file: .. pre-commit:: - :rev: 0.1.4 + :rev: 0.1.5 :hooks: snippet-fmt :args: --verbose diff --git a/pyproject.toml b/pyproject.toml index b0311ea..7a70bbf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "whey" [project] name = "snippet-fmt" -version = "0.1.4" +version = "0.1.5" description = "Format and validate code snippets in reStructuredText files." readme = "README.rst" keywords = [ "docs", "formatting", "linting",] diff --git a/repo_helper.yml b/repo_helper.yml index 277b9d0..839fc1f 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -6,7 +6,7 @@ author: 'Dominic Davis-Foster' email: 'dominic@davis-foster.co.uk' username: 'python-formate' assignee: 'domdfcoding' -version: '0.1.4' +version: '0.1.5' license: 'MIT' short_desc: 'Format and validate code snippets in reStructuredText files.' diff --git a/snippet_fmt/__init__.py b/snippet_fmt/__init__.py index 71f6230..f21e1c0 100644 --- a/snippet_fmt/__init__.py +++ b/snippet_fmt/__init__.py @@ -53,7 +53,7 @@ __author__: str = "Dominic Davis-Foster" __copyright__: str = "2021 Dominic Davis-Foster" __license__: str = "MIT License" -__version__: str = "0.1.4" +__version__: str = "0.1.5" __email__: str = "dominic@davis-foster.co.uk" __all__ = ("CodeBlockError", "RSTReformatter", "reformat_file") From 978140597689da034bb7dd3129bebcd1d8fc453b Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:56:34 +0000 Subject: [PATCH 34/57] Updated files with 'repo_helper'. (#24) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/docs_test_action.yml | 2 +- .github/workflows/flake8.yml | 4 ++-- .github/workflows/mypy.yml | 4 ++-- .github/workflows/python_ci.yml | 8 ++++---- .github/workflows/python_ci_linux.yml | 16 ++++++++-------- .github/workflows/python_ci_macos.yml | 8 ++++---- .pre-commit-config.yaml | 12 ++++++------ .readthedocs.yml | 3 +++ README.rst | 2 +- doc-source/index.rst | 2 +- doc-source/requirements.txt | 2 +- tox.ini | 3 ++- 12 files changed, 35 insertions(+), 31 deletions(-) diff --git a/.github/workflows/docs_test_action.yml b/.github/workflows/docs_test_action.yml index b09bde3..8f60ba5 100644 --- a/.github/workflows/docs_test_action.yml +++ b/.github/workflows/docs_test_action.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Check for changed files uses: dorny/paths-filter@v2 diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 8221173..0a8c0c3 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Check for changed files uses: dorny/paths-filter@v2 @@ -33,7 +33,7 @@ jobs: - name: Setup Python 🐍 if: steps.changes.outputs.code == 'true' - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: python-version: "3.8" diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 9b28b5f..10c6f30 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Check for changed files uses: dorny/paths-filter@v2 @@ -38,7 +38,7 @@ jobs: - name: Setup Python 🐍 if: steps.changes.outputs.code == 'true' - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: python-version: "3.8" diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index b6472e4..b2ba021 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.1' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.3' strategy: fail-fast: False @@ -35,11 +35,11 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.1", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-alpha.3", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -54,7 +54,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 793eb05..d167920 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.1' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.3' strategy: fail-fast: False @@ -36,11 +36,11 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.1", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-alpha.3", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -55,7 +55,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" @@ -85,10 +85,10 @@ jobs: runs-on: "ubuntu-20.04" steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Setup Python 🐍 - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: python-version: 3.8 @@ -134,11 +134,11 @@ jobs: runs-on: "ubuntu-20.04" steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" if: startsWith(github.ref, 'refs/tags/') - name: Setup Python 🐍 - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" if: startsWith(github.ref, 'refs/tags/') with: python-version: 3.8 diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 603283a..614eb2f 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.1' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.3' strategy: fail-fast: False @@ -35,11 +35,11 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.1", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-alpha.3", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -54,7 +54,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v4" + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 82c1cd2..5f94da1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ ci: repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.9.0 + rev: v0.9.1 hooks: - id: reformat-pyproject @@ -43,13 +43,13 @@ repos: - id: bind-requirements - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.3.0 + rev: v0.3.1 hooks: - id: ensure-dunder-all files: ^snippet_fmt/.*\.py$ - repo: https://github.com/domdfcoding/flake2lint - rev: v0.4.2 + rev: v0.4.3 hooks: - id: flake2lint @@ -76,18 +76,18 @@ repos: - id: forbid-crlf - repo: https://github.com/python-formate/snippet-fmt - rev: v0.1.4 + rev: v0.1.5 hooks: - id: snippet-fmt - repo: https://github.com/python-formate/formate - rev: v0.5.0 + rev: v0.7.0 hooks: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ - repo: https://github.com/domdfcoding/dep_checker - rev: v0.7.1 + rev: v0.8.0 hooks: - id: dep_checker args: diff --git a/.readthedocs.yml b/.readthedocs.yml index 4a2ec5f..e928b70 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -19,3 +19,6 @@ build: jobs: post_create_environment: - pip install . + post_install: + - pip install sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1 + sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 diff --git a/README.rst b/README.rst index 57ca7c8..73a448d 100644 --- a/README.rst +++ b/README.rst @@ -99,7 +99,7 @@ snippet-fmt :target: https://github.com/python-formate/snippet-fmt/commit/master :alt: GitHub last commit -.. |maintained| image:: https://img.shields.io/maintenance/yes/2023 +.. |maintained| image:: https://img.shields.io/maintenance/yes/2024 :alt: Maintenance .. |pypi-downloads| image:: https://img.shields.io/pypi/dm/snippet-fmt diff --git a/doc-source/index.rst b/doc-source/index.rst index 686e48c..275d957 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -104,7 +104,7 @@ snippet-fmt :last-commit: :alt: GitHub last commit - .. |maintained| maintained-shield:: 2023 + .. |maintained| maintained-shield:: 2024 :alt: Maintenance .. |pypi-downloads| pypi-shield:: diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index e76c14d..6c9404a 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -2,7 +2,7 @@ git+https://github.com/domdfcoding/sphinx-click.git git+https://github.com/sphinx-toolbox/sphinx-toolbox-experimental.git default-values>=0.6.0 extras-require>=0.5.0 -furo>=2020.11.19b18 +furo==2021.06.18b36 html-section>=0.3.0 seed-intersphinx-mapping>=1.2.2 sphinx>=3.0.3 diff --git a/tox.ini b/tox.ini index 90482e2..a888d6f 100644 --- a/tox.ini +++ b/tox.ini @@ -99,7 +99,8 @@ changedir = {toxinidir} deps = build[virtualenv]>=0.3.1 check-wheel-contents>=0.1.0 - twine>=3.2.0 + twine>=3.2.0; python_version < "3.13" + twine@git+https://github.com/pypa/twine; python_version >= "3.13" cryptography<40; implementation_name == "pypy" and python_version <= "3.7" commands = python -m build --sdist --wheel "{toxinidir}" From b2ee0a2069bbae4a9cb47f026317372ffde4edab Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Mon, 4 Mar 2024 17:18:23 +0000 Subject: [PATCH 35/57] Update tests to account for changed JSON error message in Python 3.13 --- tests/test_snippet_fmt.py | 23 ++- ..._rst_json_caps_indent_new_error_msg_0_.rst | 143 +++++++++++++++++ ..._rst_json_caps_indent_new_error_msg_0_.yml | 6 + ..._rst_json_caps_indent_new_error_msg_1_.rst | 143 +++++++++++++++++ ..._rst_json_caps_indent_new_error_msg_1_.yml | 4 + ..._rst_json_caps_indent_new_error_msg_2_.rst | 143 +++++++++++++++++ ..._rst_json_caps_indent_new_error_msg_2_.yml | 4 + ..._rst_json_caps_indent_new_error_msg_3_.rst | 143 +++++++++++++++++ ..._rst_json_caps_indent_new_error_msg_3_.yml | 4 + ..._rst_json_caps_indent_new_error_msg_4_.rst | 143 +++++++++++++++++ ..._rst_json_caps_indent_new_error_msg_4_.yml | 6 + ..._rst_json_caps_indent_new_error_msg_5_.rst | 143 +++++++++++++++++ ..._rst_json_caps_indent_new_error_msg_5_.yml | 6 + ..._rst_json_caps_indent_new_error_msg_6_.rst | 143 +++++++++++++++++ ..._rst_json_caps_indent_new_error_msg_6_.yml | 6 + ..._rst_json_caps_indent_new_error_msg_7_.rst | 143 +++++++++++++++++ ..._rst_json_caps_indent_new_error_msg_7_.yml | 6 + ...example_rst_json_caps_new_error_msg_0_.rst | 143 +++++++++++++++++ ...example_rst_json_caps_new_error_msg_0_.yml | 6 + ...example_rst_json_caps_new_error_msg_1_.rst | 143 +++++++++++++++++ ...example_rst_json_caps_new_error_msg_1_.yml | 4 + ...example_rst_json_caps_new_error_msg_2_.rst | 143 +++++++++++++++++ ...example_rst_json_caps_new_error_msg_2_.yml | 4 + ...example_rst_json_caps_new_error_msg_3_.rst | 143 +++++++++++++++++ ...example_rst_json_caps_new_error_msg_3_.yml | 4 + ...example_rst_json_caps_new_error_msg_4_.rst | 143 +++++++++++++++++ ...example_rst_json_caps_new_error_msg_4_.yml | 6 + ...example_rst_json_caps_new_error_msg_5_.rst | 143 +++++++++++++++++ ...example_rst_json_caps_new_error_msg_5_.yml | 6 + ...example_rst_json_caps_new_error_msg_6_.rst | 143 +++++++++++++++++ ...example_rst_json_caps_new_error_msg_6_.yml | 6 + ...example_rst_json_caps_new_error_msg_7_.rst | 143 +++++++++++++++++ ...example_rst_json_caps_new_error_msg_7_.yml | 6 + ...ample_rst_json_indent_new_error_msg_0_.rst | 149 ++++++++++++++++++ ...ample_rst_json_indent_new_error_msg_0_.yml | 32 ++++ ...ample_rst_json_indent_new_error_msg_1_.rst | 143 +++++++++++++++++ ...ample_rst_json_indent_new_error_msg_1_.yml | 4 + ...ample_rst_json_indent_new_error_msg_2_.rst | 143 +++++++++++++++++ ...ample_rst_json_indent_new_error_msg_2_.yml | 4 + ...ample_rst_json_indent_new_error_msg_3_.rst | 143 +++++++++++++++++ ...ample_rst_json_indent_new_error_msg_3_.yml | 4 + ...ample_rst_json_indent_new_error_msg_4_.rst | 149 ++++++++++++++++++ ...ample_rst_json_indent_new_error_msg_4_.yml | 32 ++++ ...ample_rst_json_indent_new_error_msg_5_.rst | 149 ++++++++++++++++++ ...ample_rst_json_indent_new_error_msg_5_.yml | 32 ++++ ...ample_rst_json_indent_new_error_msg_6_.rst | 149 ++++++++++++++++++ ...ample_rst_json_indent_new_error_msg_6_.yml | 32 ++++ ...ample_rst_json_indent_new_error_msg_7_.rst | 149 ++++++++++++++++++ ...ample_rst_json_indent_new_error_msg_7_.yml | 32 ++++ ..._fmt_example_rst_json_new_error_msg_0_.rst | 143 +++++++++++++++++ ..._fmt_example_rst_json_new_error_msg_0_.yml | 4 + ..._fmt_example_rst_json_new_error_msg_1_.rst | 143 +++++++++++++++++ ..._fmt_example_rst_json_new_error_msg_1_.yml | 4 + ..._fmt_example_rst_json_new_error_msg_2_.rst | 143 +++++++++++++++++ ..._fmt_example_rst_json_new_error_msg_2_.yml | 4 + ..._fmt_example_rst_json_new_error_msg_3_.rst | 143 +++++++++++++++++ ..._fmt_example_rst_json_new_error_msg_3_.yml | 4 + ..._fmt_example_rst_json_new_error_msg_4_.rst | 143 +++++++++++++++++ ..._fmt_example_rst_json_new_error_msg_4_.yml | 4 + ..._fmt_example_rst_json_new_error_msg_5_.rst | 143 +++++++++++++++++ ..._fmt_example_rst_json_new_error_msg_5_.yml | 4 + ..._fmt_example_rst_json_new_error_msg_6_.rst | 143 +++++++++++++++++ ..._fmt_example_rst_json_new_error_msg_6_.yml | 4 + ..._fmt_example_rst_json_new_error_msg_7_.rst | 143 +++++++++++++++++ ..._fmt_example_rst_json_new_error_msg_7_.yml | 4 + 65 files changed, 4915 insertions(+), 2 deletions(-) create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.yml create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.rst create mode 100644 tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.yml diff --git a/tests/test_snippet_fmt.py b/tests/test_snippet_fmt.py index c4ff36c..e844883 100644 --- a/tests/test_snippet_fmt.py +++ b/tests/test_snippet_fmt.py @@ -7,6 +7,7 @@ from _pytest.capture import CaptureResult from coincidence import AdvancedDataRegressionFixture, AdvancedFileRegressionFixture from coincidence.params import param +from coincidence.selectors import max_version, min_version from consolekit.terminal_colours import strip_ansi from consolekit.testing import CliRunner, Result from domdf_python_tools.paths import PathPlus, TemporaryPathPlus, in_directory @@ -52,15 +53,33 @@ {"ini": {"reformat": True}, "python": {"reformat": False}}, id="ini_python_false", ), - pytest.param({"JSON": {"reformat": True}}, id="json_caps"), - pytest.param({"json": {"reformat": True}}, id="json"), + pytest.param({"JSON": {"reformat": True}}, id="json_caps", marks=max_version("3.12")), + pytest.param( + {"JSON": {"reformat": True}}, + id="json_caps_new_error_msg", + marks=min_version("3.13"), + ), + pytest.param({"json": {"reformat": True}}, id="json", marks=max_version("3.12")), + pytest.param({"json": {"reformat": True}}, id="json_new_error_msg", marks=min_version("3.13")), pytest.param( {"JSON": {"reformat": True, "indent": 2}, "json": {"reformat": True}}, id="json_caps_indent", + marks=max_version("3.12"), + ), + pytest.param( + {"JSON": {"reformat": True, "indent": 2}, "json": {"reformat": True}}, + id="json_caps_indent_new_error_msg", + marks=min_version("3.13"), ), pytest.param( {"json": {"reformat": True, "indent": 2}, "JSON": {"reformat": True}}, id="json_indent", + marks=max_version("3.12"), + ), + pytest.param( + {"json": {"reformat": True, "indent": 2}, "JSON": {"reformat": True}}, + id="json_indent_new_error_msg", + marks=min_version("3.13"), ), ] ) diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' From 9086c6c9ad984ff066d99e53a75a9b9dbd220331 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 10:00:14 +0000 Subject: [PATCH 36/57] Updated files with 'repo_helper'. (#26) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/python_ci.yml | 6 +++--- .github/workflows/python_ci_linux.yml | 10 +++++----- .github/workflows/python_ci_macos.yml | 6 +++--- formate.toml | 2 +- tox.ini | 3 +-- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index b2ba021..d1b59d8 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.4' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.3", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-alpha.4", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ @@ -71,7 +71,7 @@ jobs: run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index d167920..945f3a2 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.4' strategy: fail-fast: False @@ -36,7 +36,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.3", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-alpha.4", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ @@ -73,7 +73,7 @@ jobs: run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" @@ -98,7 +98,7 @@ jobs: python -m pip install --upgrade "coveralls>=3.0.0" coverage_pyver_pragma - name: "Download Coverage 🪂" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: coverage @@ -116,7 +116,7 @@ jobs: - name: "Upload Combined Coverage Artefact 🚀" if: ${{ steps.show.outcome != 'failure' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "combined-coverage" path: .coverage diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 614eb2f..f2ff149 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.4' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.3", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-alpha.4", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ @@ -71,7 +71,7 @@ jobs: run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" diff --git a/formate.toml b/formate.toml index ea929a4..6f150b0 100644 --- a/formate.toml +++ b/formate.toml @@ -48,4 +48,4 @@ known_third_party = [ "pytest_timeout", "typing_extensions", ] -known_first_party = "snippet_fmt" +known_first_party = [ "snippet_fmt",] diff --git a/tox.ini b/tox.ini index a888d6f..90482e2 100644 --- a/tox.ini +++ b/tox.ini @@ -99,8 +99,7 @@ changedir = {toxinidir} deps = build[virtualenv]>=0.3.1 check-wheel-contents>=0.1.0 - twine>=3.2.0; python_version < "3.13" - twine@git+https://github.com/pypa/twine; python_version >= "3.13" + twine>=3.2.0 cryptography<40; implementation_name == "pypy" and python_version <= "3.7" commands = python -m build --sdist --wheel "{toxinidir}" From c5ffd09f45fe182c207c9b6290e1508dde49cd05 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 13:54:54 +0000 Subject: [PATCH 37/57] [repo-helper] Configuration Update (#27) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. --------- Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .dependabot/config.yml | 9 --------- .github/dependabot.yml | 1 + .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 4 ++-- .github/workflows/python_ci_macos.yml | 4 ++-- 5 files changed, 7 insertions(+), 15 deletions(-) delete mode 100644 .dependabot/config.yml diff --git a/.dependabot/config.yml b/.dependabot/config.yml deleted file mode 100644 index 4584924..0000000 --- a/.dependabot/config.yml +++ /dev/null @@ -1,9 +0,0 @@ -# This file is managed by 'repo_helper'. Don't edit it directly. ---- -version: 1 -update_configs: -- package_manager: python - directory: / - update_schedule: weekly - default_reviewers: - - domdfcoding diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e769ad3..454225a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,5 +6,6 @@ updates: directory: / schedule: interval: weekly + open-pull-requests-limit: 0 reviewers: - domdfcoding diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index d1b59d8..dfaa6c7 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.4' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.5' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.4", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-alpha.5", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 945f3a2..83856b6 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.4' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.5' strategy: fail-fast: False @@ -36,7 +36,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.4", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-alpha.5", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index f2ff149..858c6c4 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.4' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.5' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.4", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-alpha.5", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ From 06a6994d6da790a888108a38dd02ffbb4eb2b8eb Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 22:52:31 +0100 Subject: [PATCH 38/57] [repo-helper] Configuration Update (#28) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. --------- Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 90482e2..1551f1f 100644 --- a/tox.ini +++ b/tox.ini @@ -121,7 +121,7 @@ deps = flake8-github-actions>=0.1.0 flake8-noqa>=1.1.0,<=1.2.2 flake8-pyi>=20.10.0,<=22.8.0 - flake8-pytest-style>=1.3.0 + flake8-pytest-style>=1.3.0,<2 flake8-quotes>=3.3.0 flake8-slots>=0.1.0 flake8-sphinx-links>=0.0.4 @@ -216,8 +216,8 @@ exclude_lines = raise NotImplementedError if 0: if False: - if TYPE_CHECKING: - if typing.TYPE_CHECKING: + if TYPE_CHECKING + if typing.TYPE_CHECKING if __name__ == .__main__.: [check-wheel-contents] From e63a810a3f89ae11c6420fbff1379b9214584907 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Tue, 9 Apr 2024 10:32:04 +0100 Subject: [PATCH 39/57] Bump dom-toml * Update expected error messages (now coming from tomli not toml) * Update expected output (tomli puts small tables inline) --- requirements.txt | 2 +- ...ppet_fmt_example_rst_python3_toml_false_3_.yml | 3 +-- ...ppet_fmt_example_rst_python3_toml_false_6_.yml | 3 +-- .../test_snippet_fmt_example_rst_toml_0_.rst | 4 +--- .../test_snippet_fmt_example_rst_toml_0_.yml | 11 +++++------ .../test_snippet_fmt_example_rst_toml_3_.yml | 3 +-- .../test_snippet_fmt_example_rst_toml_4_.rst | 4 +--- .../test_snippet_fmt_example_rst_toml_4_.yml | 11 +++++------ .../test_snippet_fmt_example_rst_toml_5_.rst | 4 +--- .../test_snippet_fmt_example_rst_toml_5_.yml | 11 +++++------ .../test_snippet_fmt_example_rst_toml_6_.rst | 4 +--- .../test_snippet_fmt_example_rst_toml_6_.yml | 14 ++++++-------- .../test_snippet_fmt_example_rst_toml_7_.rst | 4 +--- .../test_snippet_fmt_example_rst_toml_7_.yml | 11 +++++------ .../test_snippet_fmt_example_rst_toml_caps_0_.rst | 4 +--- .../test_snippet_fmt_example_rst_toml_caps_0_.yml | 11 +++++------ .../test_snippet_fmt_example_rst_toml_caps_1_.yml | 4 ++-- .../test_snippet_fmt_example_rst_toml_caps_4_.rst | 4 +--- .../test_snippet_fmt_example_rst_toml_caps_4_.yml | 15 +++++++-------- .../test_snippet_fmt_example_rst_toml_caps_5_.rst | 4 +--- .../test_snippet_fmt_example_rst_toml_caps_5_.yml | 15 +++++++-------- .../test_snippet_fmt_example_rst_toml_caps_6_.rst | 4 +--- .../test_snippet_fmt_example_rst_toml_caps_6_.yml | 15 +++++++-------- .../test_snippet_fmt_example_rst_toml_caps_7_.rst | 4 +--- .../test_snippet_fmt_example_rst_toml_caps_7_.yml | 15 +++++++-------- ...ippet_fmt_example_rst_toml_python_false_0_.rst | 4 +--- ...ippet_fmt_example_rst_toml_python_false_0_.yml | 11 +++++------ ...ippet_fmt_example_rst_toml_python_false_3_.yml | 3 +-- ...ippet_fmt_example_rst_toml_python_false_4_.rst | 4 +--- ...ippet_fmt_example_rst_toml_python_false_4_.yml | 11 +++++------ ...ippet_fmt_example_rst_toml_python_false_5_.rst | 4 +--- ...ippet_fmt_example_rst_toml_python_false_5_.yml | 11 +++++------ ...ippet_fmt_example_rst_toml_python_false_6_.rst | 4 +--- ...ippet_fmt_example_rst_toml_python_false_6_.yml | 14 ++++++-------- ...ippet_fmt_example_rst_toml_python_false_7_.rst | 4 +--- ...ippet_fmt_example_rst_toml_python_false_7_.yml | 11 +++++------ 36 files changed, 107 insertions(+), 158 deletions(-) diff --git a/requirements.txt b/requirements.txt index c2c7180..c283f6a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ click>=8.0.1 consolekit>=1.2.3 -dom-toml>=0.5.0 +dom-toml>=2.0.0 domdf-python-tools>=3.0.0 entrypoints>=0.3 formate>=0.4.9 diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.yml index 7c2bc50..f5719f3 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.yml @@ -1,6 +1,5 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.yml index d280688..d7c6905 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.yml @@ -1,6 +1,5 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - "--- .../example.rst\t(original)" diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.yml index 7c2bc50..f5719f3 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.yml @@ -1,6 +1,5 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.yml index 2557166..0c6281d 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.yml @@ -1,25 +1,23 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst index bbc4ea4..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.yml index 2f8e848..4407458 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.yml index 3533983..42fb6b7 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.yml @@ -1,6 +1,6 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst index bbc4ea4..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.yml index 3cce36a..9dc4395 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.yml @@ -1,25 +1,24 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst index bbc4ea4..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.yml index 3cce36a..9dc4395 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.yml @@ -1,25 +1,24 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst index bbc4ea4..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.yml index 3cce36a..9dc4395 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.yml @@ -1,25 +1,24 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst index bbc4ea4..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.yml index 3cce36a..9dc4395 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.yml @@ -1,25 +1,24 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.yml index 7c2bc50..f5719f3 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.yml @@ -1,6 +1,5 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.yml index 2557166..0c6281d 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.yml @@ -1,25 +1,23 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst index 25e85f2..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' From 2fab56298c6ce0cdc628b1399927f4ac5f0b96e8 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:37:54 +0100 Subject: [PATCH 40/57] [repo-helper] Configuration Update (#29) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. --------- Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- doc-source/conf.py | 6 ++++++ formate.toml | 16 ++++++++-------- pyproject.toml | 25 +++++++++++-------------- 4 files changed, 26 insertions(+), 23 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5f94da1..7d9df46 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ ci: repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.9.1 + rev: v0.11.0 hooks: - id: reformat-pyproject diff --git a/doc-source/conf.py b/doc-source/conf.py index 57852a5..3a85007 100644 --- a/doc-source/conf.py +++ b/doc-source/conf.py @@ -74,8 +74,14 @@ def setup(app): # 3rd party from sphinx_toolbox.latex import better_header_layout + from sphinxemoji import sphinxemoji app.connect("config-inited", lambda app, config: better_header_layout(config)) + app.connect("build-finished", sphinxemoji.copy_asset_files) + app.add_js_file("https://unpkg.com/twemoji@latest/dist/twemoji.min.js") + app.add_js_file("twemoji.js") + app.add_css_file("twemoji.css") + app.add_transform(sphinxemoji.EmojiSubstitutions) nitpicky = True diff --git a/formate.toml b/formate.toml index 6f150b0..f7412f2 100644 --- a/formate.toml +++ b/formate.toml @@ -6,21 +6,17 @@ noqa-reformat = 60 ellipsis-reformat = 70 squish_stubs = 80 -[config] -indent = "\t" -line_length = 115 - [hooks.yapf] priority = 30 -[hooks.isort] -priority = 50 - [hooks.yapf.kwargs] yapf_style = ".style.yapf" +[hooks.isort] +priority = 50 + [hooks.isort.kwargs] -indent = "\t\t" +indent = " " multi_line_output = 8 import_heading_stdlib = "stdlib" import_heading_thirdparty = "3rd party" @@ -49,3 +45,7 @@ known_third_party = [ "typing_extensions", ] known_first_party = [ "snippet_fmt",] + +[config] +indent = " " +line_length = 115 diff --git a/pyproject.toml b/pyproject.toml index 7a70bbf..8e035b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,6 @@ dynamic = [ "requires-python", "classifiers", "dependencies",] name = "Dominic Davis-Foster" email = "dominic@davis-foster.co.uk" - [project.license] file = "LICENSE" @@ -61,7 +60,6 @@ extensions = [ "sphinx.ext.mathjax", "sphinxcontrib.extras_require", "sphinx.ext.todo", - "sphinxemoji.sphinxemoji", "notfound.extension", "sphinx_copybutton", "sphinxcontrib.default_values", @@ -77,7 +75,6 @@ extensions = [ "sphinx_toolbox_experimental.missing_xref", "sphinx_packaging", ] -sphinxemoji_style = "twemoji" gitstamp_fmt = "%d %b %Y" templates_path = [ "_templates",] html_static_path = [ "_static",] @@ -137,17 +134,6 @@ show_error_codes = true [tool.snippet-fmt] directives = [ "code-block",] -[tool.dependency-dash."requirements.txt"] -order = 10 - -[tool.dependency-dash."tests/requirements.txt"] -order = 20 -include = false - -[tool.dependency-dash."doc-source/requirements.txt"] -order = 30 -include = false - [tool.snippet-fmt.languages.toml] reformat = true @@ -160,3 +146,14 @@ reformat = true [tool.snippet-fmt.languages.ini] [tool.snippet-fmt.languages.json] + +[tool.dependency-dash."requirements.txt"] +order = 10 + +[tool.dependency-dash."tests/requirements.txt"] +order = 20 +include = false + +[tool.dependency-dash."doc-source/requirements.txt"] +order = 30 +include = false From 052ca157b8219290e79ee3b26f178558ef719be7 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:20:19 +0000 Subject: [PATCH 41/57] Bump Python 3.13 alpha (#30) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 4 ++-- .github/workflows/python_ci_macos.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index dfaa6c7..a93c83d 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.5' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.6' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.5", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-alpha.6", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 83856b6..8842838 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.5' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.6' strategy: fail-fast: False @@ -36,7 +36,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.5", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-alpha.6", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 858c6c4..75ee4bc 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.5' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.6' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.5", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-alpha.6", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ From dfdff68d9af108a8b0a3fd02d3a7477215b3a19c Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 14:14:46 +0100 Subject: [PATCH 42/57] Updated files with 'repo_helper'. (#31) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/python_ci_macos.yml | 4 ++-- .pre-commit-config.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 75ee4bc..f2f378a 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -18,8 +18,8 @@ permissions: jobs: tests: - name: "macos-latest / Python ${{ matrix.config.python-version }}" - runs-on: "macos-latest" + name: "macos-13 / Python ${{ matrix.config.python-version }}" + runs-on: "macos-13" continue-on-error: ${{ matrix.config.experimental }} env: USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.6' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7d9df46..8a19610 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,7 +43,7 @@ repos: - id: bind-requirements - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.3.1 + rev: v0.4.1 hooks: - id: ensure-dunder-all files: ^snippet_fmt/.*\.py$ From 89a0e50385190af63d208f7f6aae730e8d479923 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:40:33 +0100 Subject: [PATCH 43/57] Set UNSAFE_PYO3_SKIP_VERSION_CHECK=1 for Python 3.13. (#32) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 1551f1f..c46e2e8 100644 --- a/tox.ini +++ b/tox.ini @@ -94,6 +94,7 @@ setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 PIP_PREFER_BINARY=1 + UNSAFE_PYO3_SKIP_VERSION_CHECK=1 skip_install = True changedir = {toxinidir} deps = From c8a84605cb5b21c5c45b303211f06c127e81c4be Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 16:10:00 +0100 Subject: [PATCH 44/57] [repo-helper] Configuration Update (#33) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. --------- Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 4 ++-- .github/workflows/python_ci_macos.yml | 4 ++-- pyproject.toml | 6 +++--- tox.ini | 2 ++ 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index a93c83d..683b7fd 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.6' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.1' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.6", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-beta.1", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 8842838..838e490 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.6' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.1' strategy: fail-fast: False @@ -36,7 +36,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.6", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-beta.1", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index f2f378a..c99cd9d 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-13" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.6' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.1' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-alpha.6", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-beta.1", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/pyproject.toml b/pyproject.toml index 8e035b9..e3e44d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,13 +10,13 @@ readme = "README.rst" keywords = [ "docs", "formatting", "linting",] dynamic = [ "requires-python", "classifiers", "dependencies",] +[project.license] +file = "LICENSE" + [[project.authors]] name = "Dominic Davis-Foster" email = "dominic@davis-foster.co.uk" -[project.license] -file = "LICENSE" - [project.urls] Homepage = "https://github.com/python-formate/snippet-fmt" "Issue Tracker" = "https://github.com/python-formate/snippet-fmt/issues" diff --git a/tox.ini b/tox.ini index c46e2e8..e7041d1 100644 --- a/tox.ini +++ b/tox.ini @@ -75,6 +75,7 @@ setenv = setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 + UNSAFE_PYO3_SKIP_VERSION_CHECK=1 [testenv:py312] setenv = @@ -243,3 +244,4 @@ setenv = setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 + UNSAFE_PYO3_SKIP_VERSION_CHECK=1 From cbcfaf3c9da26a03c730ed852f836d6d93ce9efc Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:45:59 +0100 Subject: [PATCH 45/57] Bump Python 3.13 prerelease in GHA (#34) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 4 ++-- .github/workflows/python_ci_macos.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 683b7fd..34ca01c 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.1' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.2' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-beta.1", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-beta.2", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 838e490..1a55b33 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.1' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.2' strategy: fail-fast: False @@ -36,7 +36,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-beta.1", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-beta.2", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index c99cd9d..bc84a2f 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-13" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.1' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.2' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-beta.1", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-beta.2", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ From ae64be2c0019594321f966d347775adfd2df5ae1 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 10:59:44 +0100 Subject: [PATCH 46/57] Updated files with 'repo_helper'. (#35) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 4 ++-- .github/workflows/python_ci_macos.yml | 4 ++-- doc-source/conf.py | 17 ++++++++++++++++- doc-source/requirements.txt | 6 ++++++ 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 34ca01c..2d0031e 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.2' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.3' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-beta.2", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-beta.3", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 1a55b33..4e2ada8 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.2' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.3' strategy: fail-fast: False @@ -36,7 +36,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-beta.2", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-beta.3", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index bc84a2f..a6afd96 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-13" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.2' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.3' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-beta.2", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-beta.3", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/doc-source/conf.py b/doc-source/conf.py index 3a85007..4180de1 100644 --- a/doc-source/conf.py +++ b/doc-source/conf.py @@ -71,13 +71,28 @@ } +# Fix for pathlib issue with sphinxemoji on Python 3.9 and Sphinx 4.x +def copy_asset_files(app, exc): + # 3rd party + from domdf_python_tools.compat import importlib_resources + from sphinx.util.fileutil import copy_asset + + if exc: + return + + asset_files = ["twemoji.js", "twemoji.css"] + for path in asset_files: + path_str = os.fspath(importlib_resources.files("sphinxemoji") / path) + copy_asset(path_str, os.path.join(app.outdir, "_static")) + + def setup(app): # 3rd party from sphinx_toolbox.latex import better_header_layout from sphinxemoji import sphinxemoji app.connect("config-inited", lambda app, config: better_header_layout(config)) - app.connect("build-finished", sphinxemoji.copy_asset_files) + app.connect("build-finished", copy_asset_files) app.add_js_file("https://unpkg.com/twemoji@latest/dist/twemoji.min.js") app.add_js_file("twemoji.js") app.add_css_file("twemoji.css") diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index 6c9404a..348806b 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -16,5 +16,11 @@ sphinx-prompt>=1.1.0 sphinx-pyproject>=0.1.0 sphinx-tabs>=1.1.13 sphinx-toolbox>=3.5.0 +sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-serializinghtml==1.1.5 sphinxemoji>=0.1.6 toctree-plus>=0.6.1 From 2f0bc3dc8eeeb1374aa4d9d79bdc6b7974d11f58 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 30 Jul 2024 10:29:34 +0100 Subject: [PATCH 47/57] [repo-helper] Configuration Update (#36) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. --------- Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 4 ++-- .github/workflows/python_ci_macos.yml | 4 ++-- doc-source/requirements.txt | 2 -- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 2d0031e..45be850 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.4' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-beta.3", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-beta.4", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 4e2ada8..9da12df 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.4' strategy: fail-fast: False @@ -36,7 +36,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-beta.3", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-beta.4", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index a6afd96..24a2543 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-13" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.3' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.4' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-beta.3", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-beta.4", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index 348806b..947ae5c 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -12,9 +12,7 @@ sphinx-favicon>=0.2 sphinx-licenseinfo>=0.3.1 sphinx-notfound-page>=0.7.1 sphinx-packaging>=0.1.0 -sphinx-prompt>=1.1.0 sphinx-pyproject>=0.1.0 -sphinx-tabs>=1.1.13 sphinx-toolbox>=3.5.0 sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 From 11b500654da201b4537e9f4aae4e973ffd028628 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 15:05:56 +0100 Subject: [PATCH 48/57] Bump Python 3.13 prerelease (#37) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 4 ++-- .github/workflows/python_ci_macos.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 45be850..b19716e 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.4' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-rc.1' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-beta.4", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-rc.1", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 9da12df..4d20b94 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.4' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-rc.1' strategy: fail-fast: False @@ -36,7 +36,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-beta.4", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-rc.1", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 24a2543..856fa20 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-13" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-beta.4' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-rc.1' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-beta.4", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13.0-rc.1", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ From d44445e6e414eb7d7c778d091c493a9c029a9a60 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 22:26:42 +0100 Subject: [PATCH 49/57] Updated files with 'repo_helper'. (#38) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 4 ++-- .github/workflows/python_ci_macos.yml | 4 ++-- .pre-commit-config.yaml | 6 +++--- tox.ini | 3 +++ 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index b19716e..a1c3034 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-rc.1' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-rc.1", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 4d20b94..c19d255 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-rc.1' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13' strategy: fail-fast: False @@ -36,7 +36,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-rc.1", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 856fa20..b0d6e4f 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-13" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-rc.1' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13' strategy: fail-fast: False @@ -35,7 +35,7 @@ jobs: - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13.0-rc.1", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13", testenvs: "py313-dev-click{7,8},build", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8a19610..28d78ac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ ci: repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.11.0 + rev: v0.11.1 hooks: - id: reformat-pyproject @@ -42,7 +42,7 @@ repos: exclude: ^(doc-source/conf|__pkginfo__|setup|tests/.*)\.py$ - id: bind-requirements - - repo: https://github.com/domdfcoding/flake8-dunder-all + - repo: https://github.com/python-formate/flake8-dunder-all rev: v0.4.1 hooks: - id: ensure-dunder-all @@ -86,7 +86,7 @@ repos: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ - - repo: https://github.com/domdfcoding/dep_checker + - repo: https://github.com/python-coincidence/dep_checker rev: v0.8.0 hooks: - id: dep_checker diff --git a/tox.ini b/tox.ini index e7041d1..27753b6 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ # * testenv # * testenv:.package # * testenv:py313-dev +# * testenv:py313 # * testenv:py312-dev # * testenv:py312 # * testenv:docs @@ -72,12 +73,14 @@ setenv = PIP_DISABLE_PIP_VERSION_CHECK=1 [testenv:py313-dev] +download = True setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 UNSAFE_PYO3_SKIP_VERSION_CHECK=1 [testenv:py312] +download = True setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 From 2d863816ae186a6cf6374da0f1aa217245578115 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 11:43:43 +0000 Subject: [PATCH 50/57] [repo-helper] Configuration Update (#39) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. --------- Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- README.rst | 2 +- doc-source/index.rst | 2 +- tox.ini | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 28d78ac..c8e06e4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -81,7 +81,7 @@ repos: - id: snippet-fmt - repo: https://github.com/python-formate/formate - rev: v0.7.0 + rev: v0.8.0 hooks: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ diff --git a/README.rst b/README.rst index 73a448d..b3dc9cf 100644 --- a/README.rst +++ b/README.rst @@ -99,7 +99,7 @@ snippet-fmt :target: https://github.com/python-formate/snippet-fmt/commit/master :alt: GitHub last commit -.. |maintained| image:: https://img.shields.io/maintenance/yes/2024 +.. |maintained| image:: https://img.shields.io/maintenance/yes/2025 :alt: Maintenance .. |pypi-downloads| image:: https://img.shields.io/pypi/dm/snippet-fmt diff --git a/doc-source/index.rst b/doc-source/index.rst index 275d957..87a2f15 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -104,7 +104,7 @@ snippet-fmt :last-commit: :alt: GitHub last commit - .. |maintained| maintained-shield:: 2024 + .. |maintained| maintained-shield:: 2025 :alt: Maintenance .. |pypi-downloads| pypi-shield:: diff --git a/tox.ini b/tox.ini index 27753b6..9b2d35d 100644 --- a/tox.ini +++ b/tox.ini @@ -239,11 +239,13 @@ filterwarnings = ignore:lib2to3 package is deprecated and may not be able to parse Python 3.10+:PendingDeprecationWarning [testenv:py312-click{7,8}] +download = True setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 [testenv:py313-dev-click{7,8}] +download = True setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 From 31871dfefe3e76088d257864e13ab14353272082 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Tue, 8 Apr 2025 14:50:37 +0100 Subject: [PATCH 51/57] Drop support for Python 3.6 --- .github/workflows/python_ci.yml | 5 ++--- .github/workflows/python_ci_linux.yml | 5 ++--- .github/workflows/python_ci_macos.yml | 5 ++--- pyproject.toml | 2 +- repo_helper.yml | 3 +-- tox.ini | 12 +++++------- 6 files changed, 13 insertions(+), 19 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index a1c3034..8d01ea8 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,20 +22,19 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13' + USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36-click{7,8},build", experimental: False} - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13", testenvs: "py313-click{7,8},build", experimental: False} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index c19d255..9d7e278 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,20 +23,19 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13' + USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36-click{7,8},build", experimental: False} - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13", testenvs: "py313-click{7,8},build", experimental: False} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index b0d6e4f..3ba7d80 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,20 +22,19 @@ jobs: runs-on: "macos-13" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13' + USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36-click{7,8},build", experimental: False} - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13", testenvs: "py313-dev-click{7,8},build", experimental: True} + - {python-version: "3.13", testenvs: "py313-click{7,8},build", experimental: False} steps: - name: Checkout 🛎️ diff --git a/pyproject.toml b/pyproject.toml index e3e44d9..90d9d54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ base-classifiers = [ "Intended Audience :: Developers", "Typing :: Typed", ] -python-versions = [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12",] +python-versions = [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13",] python-implementations = [ "CPython",] platforms = [ "Windows", "macOS", "Linux",] license-key = "MIT" diff --git a/repo_helper.yml b/repo_helper.yml index 839fc1f..881c254 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -17,14 +17,13 @@ sphinx_html_theme: furo docs_fail_on_warning: true python_versions: - - '3.6' - '3.7' - '3.8' - '3.9' - "3.10" - "3.11" - "3.12" - - 3.13-dev + - "3.13" keywords: - formatting diff --git a/tox.ini b/tox.ini index 9b2d35d..810fe74 100644 --- a/tox.ini +++ b/tox.ini @@ -23,14 +23,13 @@ [tox] envlist = - py36-click{7,8} py37-click{7,8} py38-click{7,8} py39-click{7,8} py310-click{7,8} py311-click{7,8} py312-click{7,8} - py313-dev-click{7,8} + py313-click{7,8} mypy build skip_missing_interpreters = True @@ -43,14 +42,13 @@ requires = [envlists] test = - py36-click{7,8} py37-click{7,8} py38-click{7,8} py39-click{7,8} py310-click{7,8} py311-click{7,8} py312-click{7,8} - py313-dev-click{7,8} + py313-click{7,8} qa = mypy, lint cov = py38-click7, coverage @@ -72,7 +70,7 @@ setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 -[testenv:py313-dev] +[testenv:py313] download = True setenv = PYTHONDEVMODE=1 @@ -204,7 +202,7 @@ inline-quotes = " multiline-quotes = """ docstring-quotes = """ count = True -min_python_version = 3.6.1 +min_python_version = 3.7 unused-arguments-ignore-abstract-functions = True unused-arguments-ignore-overload-functions = True unused-arguments-ignore-magic-methods = True @@ -244,7 +242,7 @@ setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 -[testenv:py313-dev-click{7,8}] +[testenv:py313-click{7,8}] download = True setenv = PYTHONDEVMODE=1 From 42d7c8e1c5b4f8b7865ff65a31be3b6f280ea1ad Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 16:24:50 +0100 Subject: [PATCH 52/57] Bump Ubuntu to 22.04 (#40) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/flake8.yml | 2 +- .github/workflows/mypy.yml | 2 +- .github/workflows/python_ci_linux.yml | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 0a8c0c3..af1b394 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -16,7 +16,7 @@ permissions: jobs: Run: name: "Flake8" - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" steps: - name: Checkout 🛎️ diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 10c6f30..bd74787 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: - os: ['ubuntu-20.04', 'windows-2019'] + os: ['ubuntu-22.04', 'windows-2019'] fail-fast: false steps: diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 9d7e278..24f2e94 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -19,8 +19,8 @@ permissions: jobs: tests: - name: "ubuntu-20.04 / Python ${{ matrix.config.python-version }}" - runs-on: "ubuntu-20.04" + name: "ubuntu-22.04 / Python ${{ matrix.config.python-version }}" + runs-on: "ubuntu-22.04" continue-on-error: ${{ matrix.config.experimental }} env: USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13' @@ -81,7 +81,7 @@ jobs: Coverage: needs: tests - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" steps: - name: Checkout 🛎️ uses: "actions/checkout@v4" @@ -130,7 +130,7 @@ jobs: Deploy: needs: tests - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" steps: - name: Checkout 🛎️ uses: "actions/checkout@v4" From 3caf52748a40e536fc9479317a4e9bccce2b4b0c Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 17:31:38 +0100 Subject: [PATCH 53/57] [repo-helper] Configuration Update (#42) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. --------- Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/python_ci_macos.yml | 18 +++++++++--------- .readthedocs.yml | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 3ba7d80..e5a791a 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -18,8 +18,8 @@ permissions: jobs: tests: - name: "macos-13 / Python ${{ matrix.config.python-version }}" - runs-on: "macos-13" + name: "macos-${{ matrix.config.os-ver }} / Python ${{ matrix.config.python-version }}" + runs-on: "macos-${{ matrix.config.os-ver }}" continue-on-error: ${{ matrix.config.experimental }} env: USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13' @@ -28,13 +28,13 @@ jobs: fail-fast: False matrix: config: - - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} - - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} - - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} - - {python-version: "3.13", testenvs: "py313-click{7,8},build", experimental: False} + - {python-version: "3.7", os-ver: "13", testenvs: "py37-click{7,8},build", experimental: False} + - {python-version: "3.8", os-ver: "14", testenvs: "py38-click{7,8},build", experimental: False} + - {python-version: "3.9", os-ver: "14", testenvs: "py39-click{7,8},build", experimental: False} + - {python-version: "3.10", os-ver: "14", testenvs: "py310-click{7,8},build", experimental: False} + - {python-version: "3.11", os-ver: "14", testenvs: "py311-click{7,8},build", experimental: False} + - {python-version: "3.12", os-ver: "14", testenvs: "py312-click{7,8},build", experimental: False} + - {python-version: "3.13", os-ver: "14", testenvs: "py313-click{7,8},build", experimental: False} steps: - name: Checkout 🛎️ diff --git a/.readthedocs.yml b/.readthedocs.yml index e928b70..83fc025 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -13,7 +13,7 @@ python: - requirements: requirements.txt - requirements: doc-source/requirements.txt build: - os: ubuntu-20.04 + os: ubuntu-22.04 tools: python: '3.9' jobs: From 068f89b0b521ddfb55550c1fcb659461274ca70d Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 21:33:03 +0100 Subject: [PATCH 54/57] Updated files with 'repo_helper'. (#43) Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- .github/workflows/python_ci.yml | 1 + .github/workflows/python_ci_linux.yml | 2 ++ .github/workflows/python_ci_macos.yml | 1 + .pre-commit-config.yaml | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 8d01ea8..7f1196f 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -75,3 +75,4 @@ jobs: with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage + include-hidden-files: true diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 24f2e94..6bbee2e 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -77,6 +77,7 @@ jobs: with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage + include-hidden-files: true Coverage: @@ -119,6 +120,7 @@ jobs: with: name: "combined-coverage" path: .coverage + include-hidden-files: true - name: "Upload Combined Coverage to Coveralls" if: ${{ steps.show.outcome != 'failure' }} diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index e5a791a..b945833 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -75,3 +75,4 @@ jobs: with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage + include-hidden-files: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c8e06e4..857b362 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ ci: repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.11.1 + rev: v0.13.0 hooks: - id: reformat-pyproject From 612344dcd4b9b15b89222c82060452b18538147c Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 16:42:54 +0100 Subject: [PATCH 55/57] [repo-helper] Configuration Update (#44) * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. --------- Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com> --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 810fe74..2b8b96d 100644 --- a/tox.ini +++ b/tox.ini @@ -134,7 +134,7 @@ deps = git+https://github.com/domdfcoding/flake8-rst-docstrings.git git+https://github.com/python-formate/flake8-unused-arguments.git@magic-methods git+https://github.com/python-formate/flake8-missing-annotations.git - pydocstyle>=6.0.0 + git+https://github.com/domdfcoding/pydocstyle.git@stub-functions pygments>=2.7.1 importlib_metadata<4.5.0; python_version<'3.8' commands = python3 -m flake8_rst_docstrings_sphinx snippet_fmt tests --allow-toolbox {posargs} From 906b7ee70031af2dc7ed11c53d8443a5ab5c685e Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Mon, 9 Jun 2025 15:30:23 +0100 Subject: [PATCH 56/57] Bump mypy --- .github/workflows/flake8.yml | 2 +- .github/workflows/mypy.yml | 2 +- pyproject.toml | 2 +- repo_helper.yml | 2 ++ snippet_fmt/__init__.py | 2 +- tox.ini | 14 +++++++------- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index af1b394..5e67c5c 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -35,7 +35,7 @@ jobs: if: steps.changes.outputs.code == 'true' uses: "actions/setup-python@v5" with: - python-version: "3.8" + python-version: "3.9" - name: Install dependencies 🔧 if: steps.changes.outputs.code == 'true' diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index bd74787..ea0b4e5 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -40,7 +40,7 @@ jobs: if: steps.changes.outputs.code == 'true' uses: "actions/setup-python@v5" with: - python-version: "3.8" + python-version: "3.9" - name: Install dependencies 🔧 run: | diff --git a/pyproject.toml b/pyproject.toml index 90d9d54..3eb022d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -124,7 +124,7 @@ autodoc_exclude_members = [ ] [tool.mypy] -python_version = "3.8" +python_version = "3.9" namespace_packages = true check_untyped_defs = true warn_unused_ignores = true diff --git a/repo_helper.yml b/repo_helper.yml index 881c254..bed2e48 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -15,6 +15,8 @@ use_whey: true min_coverage: 95 sphinx_html_theme: furo docs_fail_on_warning: true +mypy_version: 1.16 +python_deploy_version: 3.9 python_versions: - '3.7' diff --git a/snippet_fmt/__init__.py b/snippet_fmt/__init__.py index f21e1c0..d5d69bd 100644 --- a/snippet_fmt/__init__.py +++ b/snippet_fmt/__init__.py @@ -38,7 +38,7 @@ # 3rd party import click -import entrypoints # type: ignore[import] +import entrypoints # type: ignore[import-untyped] from consolekit.terminal_colours import ColourTrilean, resolve_color_default from consolekit.utils import coloured_diff from domdf_python_tools.paths import PathPlus diff --git a/tox.ini b/tox.ini index 2b8b96d..f4834c6 100644 --- a/tox.ini +++ b/tox.ini @@ -50,7 +50,7 @@ test = py312-click{7,8} py313-click{7,8} qa = mypy, lint -cov = py38-click7, coverage +cov = py39-click7, coverage [testenv] setenv = @@ -110,7 +110,7 @@ commands = check-wheel-contents dist/ [testenv:lint] -basepython = python3.8 +basepython = python3.9 changedir = {toxinidir} ignore_errors = True skip_install = True @@ -140,7 +140,7 @@ deps = commands = python3 -m flake8_rst_docstrings_sphinx snippet_fmt tests --allow-toolbox {posargs} [testenv:perflint] -basepython = python3.8 +basepython = python3.9 changedir = {toxinidir} ignore_errors = True skip_install = True @@ -148,16 +148,16 @@ deps = perflint commands = python3 -m perflint snippet_fmt {posargs} [testenv:mypy] -basepython = python3.8 +basepython = python3.9 ignore_errors = True changedir = {toxinidir} deps = - mypy==0.971 + mypy==1.16 -r{toxinidir}/tests/requirements.txt commands = mypy snippet_fmt tests {posargs} [testenv:pyup] -basepython = python3.8 +basepython = python3.9 skip_install = True ignore_errors = True changedir = {toxinidir} @@ -165,7 +165,7 @@ deps = pyupgrade-directories commands = pyup_dirs snippet_fmt tests --py36-plus --recursive [testenv:coverage] -basepython = python3.8 +basepython = python3.9 skip_install = True ignore_errors = True whitelist_externals = /bin/bash From ae5dc4dff40db912a84a4cea7244447b6dddfbc4 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Mon, 9 Jun 2025 15:30:34 +0100 Subject: [PATCH 57/57] Bump Windows for GitHub Actions --- .github/workflows/mypy.yml | 2 +- .github/workflows/python_ci.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index ea0b4e5..4c22a52 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: - os: ['ubuntu-22.04', 'windows-2019'] + os: ['ubuntu-22.04', 'windows-2022'] fail-fast: false steps: diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 7f1196f..0c0a148 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -18,8 +18,8 @@ permissions: jobs: tests: - name: "windows-2019 / Python ${{ matrix.config.python-version }}" - runs-on: "windows-2019" + name: "windows-2022 / Python ${{ matrix.config.python-version }}" + runs-on: "windows-2022" continue-on-error: ${{ matrix.config.experimental }} env: USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13'