From fd60b7284a78e3fe371dd90566f0cc316deaf4c4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 30 Apr 2023 15:52:35 +0000 Subject: [PATCH] Make sure a ``tool`` table is created in ``toml`` generation (#8638) (#8640) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Pierre Sassoulas (cherry picked from commit 434d49f69a65adf75c86dd9629ffbb6d8300df67) Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> --- doc/exts/pylint_options.py | 4 +++- doc/user_guide/configuration/all-options.rst | 6 +++--- doc/whatsnew/fragments/8632.bugfix | 4 ---- pylint/config/arguments_manager.py | 5 ++++- pyproject.toml | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 doc/whatsnew/fragments/8632.bugfix diff --git a/doc/exts/pylint_options.py b/doc/exts/pylint_options.py index f402125a73..2e6be23e2d 100644 --- a/doc/exts/pylint_options.py +++ b/doc/exts/pylint_options.py @@ -70,8 +70,10 @@ def _create_checker_section( checker_string += get_rst_title(f"``{checker.capitalize()}`` **Checker**", "-") toml_doc = tomlkit.document() + tool_table = tomlkit.table(is_super_table=True) + toml_doc.add(tomlkit.key("tool"), tool_table) pylint_tool_table = tomlkit.table(is_super_table=True) - toml_doc.add(tomlkit.key(["tool", "pylint"]), pylint_tool_table) + tool_table.add(tomlkit.key("pylint"), pylint_tool_table) checker_table = tomlkit.table() diff --git a/doc/user_guide/configuration/all-options.rst b/doc/user_guide/configuration/all-options.rst index 2cbc3f4838..ecdfc9ef51 100644 --- a/doc/user_guide/configuration/all-options.rst +++ b/doc/user_guide/configuration/all-options.rst @@ -171,7 +171,7 @@ Standard Checkers """""""""""" *Minimum Python version to use for version dependent checks. Will default to the version used to run pylint.* -**Default:** ``(3, 10)`` +**Default:** ``(3, 11)`` --recursive @@ -233,7 +233,7 @@ Standard Checkers confidence = ["HIGH", "CONTROL_FLOW", "INFERENCE", "INFERENCE_FAILURE", "UNDEFINED"] - disable = ["consider-using-augmented-assign"] + disable = ["raw-checker-failed", "bad-inline-option", "locally-disabled", "file-ignored", "suppressed-message", "useless-suppression", "deprecated-pragma", "use-symbolic-message-instead", "consider-using-augmented-assign"] enable = [] @@ -271,7 +271,7 @@ Standard Checkers persistent = true - py-version = [3, 10] + py-version = [3, 11] recursive = false diff --git a/doc/whatsnew/fragments/8632.bugfix b/doc/whatsnew/fragments/8632.bugfix deleted file mode 100644 index 25619d412a..0000000000 --- a/doc/whatsnew/fragments/8632.bugfix +++ /dev/null @@ -1,4 +0,0 @@ -tomlkit max version was set to 0.11.7 following a -regression in tomlkit 0.11.8. - -Closes #8632 diff --git a/pylint/config/arguments_manager.py b/pylint/config/arguments_manager.py index 2151aefde4..ef1d0cc72c 100644 --- a/pylint/config/arguments_manager.py +++ b/pylint/config/arguments_manager.py @@ -704,8 +704,11 @@ def _generate_config_file(self, *, minimal: bool = False) -> str: stdout. """ toml_doc = tomlkit.document() + tool_table = tomlkit.table(is_super_table=True) + toml_doc.add(tomlkit.key("tool"), tool_table) + pylint_tool_table = tomlkit.table(is_super_table=True) - toml_doc.add(tomlkit.key(["tool", "pylint"]), pylint_tool_table) + tool_table.add(tomlkit.key("pylint"), pylint_tool_table) for group in sorted( self._arg_parser._action_groups, diff --git a/pyproject.toml b/pyproject.toml index 17b7a68a45..bd542646b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ dependencies = [ "isort>=4.2.5,<6", "mccabe>=0.6,<0.8", "tomli>=1.1.0;python_version<'3.11'", - "tomlkit>=0.10.1,<=0.11.7", + "tomlkit>=0.10.1", "colorama>=0.4.5;sys_platform=='win32'", "typing-extensions>=3.10.0;python_version<'3.10'", ]