Skip to content

Commit fd60b72

Browse files
Make sure a tool table is created in toml generation (#8638) (#8640)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> (cherry picked from commit 434d49f) Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
1 parent 0b5defa commit fd60b72

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

doc/exts/pylint_options.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ def _create_checker_section(
7070
checker_string += get_rst_title(f"``{checker.capitalize()}`` **Checker**", "-")
7171

7272
toml_doc = tomlkit.document()
73+
tool_table = tomlkit.table(is_super_table=True)
74+
toml_doc.add(tomlkit.key("tool"), tool_table)
7375
pylint_tool_table = tomlkit.table(is_super_table=True)
74-
toml_doc.add(tomlkit.key(["tool", "pylint"]), pylint_tool_table)
76+
tool_table.add(tomlkit.key("pylint"), pylint_tool_table)
7577

7678
checker_table = tomlkit.table()
7779

doc/user_guide/configuration/all-options.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Standard Checkers
171171
""""""""""""
172172
*Minimum Python version to use for version dependent checks. Will default to the version used to run pylint.*
173173

174-
**Default:** ``(3, 10)``
174+
**Default:** ``(3, 11)``
175175

176176

177177
--recursive
@@ -233,7 +233,7 @@ Standard Checkers
233233
234234
confidence = ["HIGH", "CONTROL_FLOW", "INFERENCE", "INFERENCE_FAILURE", "UNDEFINED"]
235235
236-
disable = ["consider-using-augmented-assign"]
236+
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"]
237237
238238
enable = []
239239
@@ -271,7 +271,7 @@ Standard Checkers
271271
272272
persistent = true
273273
274-
py-version = [3, 10]
274+
py-version = [3, 11]
275275
276276
recursive = false
277277

doc/whatsnew/fragments/8632.bugfix

-4
This file was deleted.

pylint/config/arguments_manager.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,11 @@ def _generate_config_file(self, *, minimal: bool = False) -> str:
704704
stdout.
705705
"""
706706
toml_doc = tomlkit.document()
707+
tool_table = tomlkit.table(is_super_table=True)
708+
toml_doc.add(tomlkit.key("tool"), tool_table)
709+
707710
pylint_tool_table = tomlkit.table(is_super_table=True)
708-
toml_doc.add(tomlkit.key(["tool", "pylint"]), pylint_tool_table)
711+
tool_table.add(tomlkit.key("pylint"), pylint_tool_table)
709712

710713
for group in sorted(
711714
self._arg_parser._action_groups,

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dependencies = [
4343
"isort>=4.2.5,<6",
4444
"mccabe>=0.6,<0.8",
4545
"tomli>=1.1.0;python_version<'3.11'",
46-
"tomlkit>=0.10.1,<=0.11.7",
46+
"tomlkit>=0.10.1",
4747
"colorama>=0.4.5;sys_platform=='win32'",
4848
"typing-extensions>=3.10.0;python_version<'3.10'",
4949
]

0 commit comments

Comments
 (0)