Skip to content

Commit 434d49f

Browse files
Make sure a tool table is created in toml generation (#8638)
Co-authored-by: Pierre Sassoulas <[email protected]>
1 parent 1cbc3d8 commit 434d49f

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

doc/exts/pylint_options.py

Lines changed: 3 additions & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 0 additions & 4 deletions
This file was deleted.

pylint/config/arguments_manager.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,11 @@ def _generate_config_file(self, *, minimal: bool = False) -> str:
303303
stdout.
304304
"""
305305
toml_doc = tomlkit.document()
306+
tool_table = tomlkit.table(is_super_table=True)
307+
toml_doc.add(tomlkit.key("tool"), tool_table)
308+
306309
pylint_tool_table = tomlkit.table(is_super_table=True)
307-
toml_doc.add(tomlkit.key(["tool", "pylint"]), pylint_tool_table)
310+
tool_table.add(tomlkit.key("pylint"), pylint_tool_table)
308311

309312
for group in sorted(
310313
self._arg_parser._action_groups,

pyproject.toml

Lines changed: 1 addition & 1 deletion
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)