Closed DimitriPapadopoulos closed 3 months ago
Are one of those fairly new? We might need ti bum validate-pyproject-schema-store. Or the SchemaStore might need a new update (which the stuff team does pretty regularly).
None of these settings is very recent, the most recent is from-first
from 2023 (https://github.com/astral-sh/ruff/pull/8663).
In the error message, the isort
key is almost empty:
'isort':
at least one of the following:
- {}
- {type: null}
Is that expected?
Hard to check on my phone, is it in here: https://json.schemastore.org/ruff.json
It points to the IsortOptions
definitions:
It's mad about
lint.select = ["E", "F", "B", "U", "YTT", "C", "DTZ", "PYI", "PT", "I", "FURB", "RUF"]
I think because it has preview only selections in it.
The issue is "U" is not a valid code. "UP" is the correct code. See https://github.com/pypa/setuptools_scm/pull/1064.
What got me confused is that there were 2 error messages for the same issue;
The error message could be more helpful (perhaps show the actual invalid code).
For validation, that's handled by validate-pyproject, maybe the error message can be improved there (it's from fastjsonshema). For our end (sp-repo-review, that is), RF103: pyupgrade must be selected. Must select the pyupgrade UP checks.
described exactly what was missing (no UP
code).
Because RF103
had already been raised about the UP
typo, I was misled into looking elsewhere for the VPP001
cause.
The same root cause should not result into different error messages, especially without enough details to clearly identify the root cause (at least a line number).
See: https://learn.scientific-python.org/development/guides/repo-review/?repo=pypa%2Fsetuptools_scm&branch=main
The error message is unclear, I think the failure originates here: