Support for PEP 639 in RUF200
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).
Agree, we should change the validation here.
@konstin do you know why we flag license-files if it isn't a table?
The pyproject-toml crate has an outdated version of the PEP, we need to fix this in that crate which will fix the rule.
This has been merged into the ruff-0.8 branch; it will land in the next release (Ruff 0.8)