jendrikseipp / vulture

Find dead Python code
MIT License
3.29k stars 145 forks source link

TOML parsing fails with multi-line strings #331

Closed mcobzarenco closed 9 months ago

mcobzarenco commented 9 months ago

Trying to parse a pyproject.toml that contains multi-line strings fails with

toml.decoder.TomlDecodeError: Invalid inline table value encountered

To reproduce, add any TOML multiline string to your pyproject.toml file, for example, we have this section

[tool.pdm.scripts]
# Linting utilities
check = {shell = """
    flake8 foundation
    isort --check --diff foundation
    black --check foundation
    pyright --warnings foundation
"""}
fmt = {shell = """
    autoflake -i -r foundation
    isort foundation
    black foundation
"""}
jendrikseipp commented 9 months ago

This sounds like a problem in the toml library. Please report this problem directly to the Python toml project: https://github.com/uiri/toml