Skip to content

Commit

Permalink
Make sure a tool table is created in toml generation (#8638) (#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
github-actions[bot] and DanielNoord authored Apr 30, 2023
1 parent 0b5defa commit fd60b72
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
4 changes: 3 additions & 1 deletion doc/exts/pylint_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
6 changes: 3 additions & 3 deletions doc/user_guide/configuration/all-options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = []
Expand Down Expand Up @@ -271,7 +271,7 @@ Standard Checkers
persistent = true
py-version = [3, 10]
py-version = [3, 11]
recursive = false
Expand Down
4 changes: 0 additions & 4 deletions doc/whatsnew/fragments/8632.bugfix

This file was deleted.

5 changes: 4 additions & 1 deletion pylint/config/arguments_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'",
]
Expand Down

0 comments on commit fd60b72

Please sign in to comment.