Skip to content

Update .gitignore and fix license format in pyproject.toml #1718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

barnett-yuxiang
Copy link
Contributor

@barnett-yuxiang barnett-yuxiang commented Apr 24, 2025

User description

When executing in the current main branch code, the following error message is encountered.

poetry install

The Poetry configuration is invalid:
- project.license must be valid exactly by one definition (0 matches found)

The problem is in your pyproject.toml file with the license configuration. Poetry expects a specific format for the license field, but your current configuration is incorrect.

The error message indicates that your license definition doesn't match any of the expected formats for Poetry. Currently, your license definition is:

license = { name = "Apache 2.0", file = "LICENSE" }

This format works for PEP 621 (standard Python packaging), but Poetry requires a different format.

Fix

Use a simple string

license = "Apache-2.0"

Make sure you're using the standardized SPDX identifier "Apache-2.0" instead of "Apache 2.0" (note the hyphen).


PR Type

bug_fix, enhancement


Description

  • Fix Poetry license field to use SPDX identifier

  • Ensure compatibility with Poetry's expected license format


Changes walkthrough 📝

Relevant files
Bug fix
pyproject.toml
Update license field to valid Poetry format                           

pyproject.toml

  • Changed license field from table to SPDX string
  • Replaced "Apache 2.0" with "Apache-2.0" for Poetry compliance
  • +1/-1     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    Copy link
    Contributor Author

    @barnett-yuxiang barnett-yuxiang left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    LGTM

    Copy link
    Contributor

    Failed to generate code suggestions for PR

    @barnett-yuxiang
    Copy link
    Contributor Author

    @mrT23 If you have time, plz review it ^_^

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

    Successfully merging this pull request may close these issues.

    1 participant