You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pylint fails to generate a TOML config using --generate-toml-config after upgrading tomlkit from 0.11.7 to 0.11.8.
Configuration
No response
Command used
pylint --generate-toml-config
Pylint output
Traceback (most recent call last):
File "/Users/ltm/venv/bin/pylint", line 8, in<module>sys.exit(run_pylint())
^^^^^^^^^^^^
File "/Users/ltm/venv/lib/python3.11/site-packages/pylint/__init__.py", line 36, in run_pylint
PylintRun(argv or sys.argv[1:])
File "/Users/ltm/venv/lib/python3.11/site-packages/pylint/lint/run.py", line 169, in __init__
args = _config_initialization(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ltm/venv/lib/python3.11/site-packages/pylint/config/config_initialization.py", line 75, in _config_initialization
parsed_args_list = linter._parse_command_line_configuration(args_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ltm/venv/lib/python3.11/site-packages/pylint/config/arguments_manager.py", line 278, in _parse_command_line_configuration
self.config, parsed_args = self._arg_parser.parse_known_args(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 1895, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 2107, in _parse_known_args
start_index = consume_optional(start_index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 2047, in consume_optional
take_action(action, args, option_string)
File "/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 1971, in take_action
action(self, namespace, argument_values, option_string)
File "/Users/ltm/venv/lib/python3.11/site-packages/pylint/config/callback_actions.py", line 286, in __call__
print(self.run.linter._generate_config_file())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ltm/venv/lib/python3.11/site-packages/pylint/config/arguments_manager.py", line 708, in _generate_config_file
toml_doc.add(tomlkit.key(["tool", "pylint"]), pylint_tool_table)
File "/Users/ltm/venv/lib/python3.11/site-packages/tomlkit/container.py", line 114, in add
return self.append(key, item)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ltm/venv/lib/python3.11/site-packages/tomlkit/container.py", line 157, in append
self._handle_dotted_key(key, item)
File "/Users/ltm/venv/lib/python3.11/site-packages/tomlkit/container.py", line 118, in _handle_dotted_key
raise TOMLKitError("Can't add a table to a dotted key")
tomlkit.exceptions.TOMLKitError: Can't add a table to a dotted key
Bug description
pylint fails to generate a TOML config using
--generate-toml-config
after upgrading tomlkit from 0.11.7 to 0.11.8.Configuration
No response
Command used
Pylint output
Expected behavior
pylint should print the generated TOML config.
Pylint version
OS / Environment
macOS 13.3.1 (22E261)
Additional dependencies
The text was updated successfully, but these errors were encountered: