Skip to content

Support for PEP 639 in RUF200 #13869

@henryiii

Description

@henryiii

In --preview, the following error is shown for PEP 639 style licenses:

tests/packages/spdx/pyproject.toml:5:17: RUF200 Failed to parse pyproject.toml: wanted string or table
  |
3 | version = "1.2.3"
4 | license = "MIT OR GPL-2.0-or-later OR (FSFUL AND BSD-2-Clause)"
5 | license-files = ["LICEN[CS]E*", "AUTHORS*", "licenses/LICENSE.MIT"]
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUF200

I don't fully understand the error message (license-files was never a string or table), but it would be good to support PEP 639, at least before this leaves preview (Edit: Ahh, this happens if you run ruff check . even without --preview, I always use pre-commit except for checking --preview).

Metadata

Metadata

Assignees

No one assigned

    Labels

    ruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions