From 434d49f69a65adf75c86dd9629ffbb6d8300df67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Sun, 30 Apr 2023 17:32:47 +0200 Subject: Make sure a ``tool`` table is created in ``toml`` generation (#8638) Co-authored-by: Pierre Sassoulas --- 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 64a7eda9c..170eefd1d 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 2cbc3f483..ecdfc9ef5 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 25619d412..000000000 --- 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 4bc891ea0..b99c9476f 100644 --- a/pylint/config/arguments_manager.py +++ b/pylint/config/arguments_manager.py @@ -303,8 +303,11 @@ class _ArgumentsManager: 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 a7a07619d..e4b63c660 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'", ] -- cgit v1.2.1