Skip to content

Generated pyproject.toml is invalid #78

Closed

Description

@paolodina

The error is shown in VS Code from the linter.

Additional properties are not allowed ('ellar' was unexpected)Even Better TOML

pyproject toml

The file is parseable:

In [1]: from tomlkit import parse

In [2]: foo="""
   ...: [ellar]
   ...: default = "new_project"
   ...: """

In [3]: parse(foo)
Out[3]: {'ellar': {'default': 'new_project'}}

but trying with validate-pyproject the error again.

$ validate-pyproject pyproject.toml 
Invalid file: pyproject.toml
[ERROR] `data` must not contain {'ellar'} properties

Not sure if it's a real problem, though ellar-cli relies on this nomenclature in pyproject.toml to handle the multi-project if I'm not mistaken.

Activity

  1. eadwinCode commented on Mar 22, 2024

    @eadwinCode
    Collaborator

    Yes @paolodina you are right. The EllarCLI depends on pyproject.toml to handle multiple-projects.

    On the linting error, I am using the tomlkit package to write to project.toml file but I will take a look at it to know why it's showing errors on VS code cause it doesn't show on pycharm.

  2. eadwinCode commented on Mar 22, 2024

    @eadwinCode
    Collaborator

    I will also use this validate-pyproject to ensure everything works fine

  3. eadwinCode commented on Apr 4, 2024

    @eadwinCode
    Collaborator

    @paolodina Can you close this if the latest update fixes the issue?

  4. paolodina commented on Apr 4, 2024

    @paolodina
    Author

    Of course @eadwinCode, I read the patch when you did it but forgot to close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions