Skip to content
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

tool ruff can't validate lint subsection #185

Closed
henryiii opened this issue Aug 5, 2024 · 1 comment
Closed

tool ruff can't validate lint subsection #185

henryiii opened this issue Aug 5, 2024 · 1 comment

Comments

@henryiii
Copy link
Collaborator

henryiii commented Aug 5, 2024

The following, from https://github.com/pypa/setuptools_scm/blob/main/pyproject.toml:

[tool.ruff]
fix = true
lint.select = ["E", "F", "B", "U", "YTT", "C", "DTZ", "PYI", "PT", "I", "FURB", "RUF"]
lint.ignore = ["B028"]
lint.preview = true

[tool.ruff.lint.isort]
force-single-line = true
from-first = false
lines-between-types = 1
order-by-type = true

Using https://json.schemastore.org/ruff.json (from validate-pyproject-scheme-store) produces:

Invalid file: pyproject.toml
[ERROR] `tool.ruff.lint` cannot be validated by any definition:

    - type: table
      keys:
        ...
        'isort':
          at least one of the following:
            - {}
            - {type: null}
        ...

Maybe multiple refs are not supported? See scientific-python/repo-review#232.

@henryiii henryiii closed this as completed Aug 5, 2024
@henryiii
Copy link
Collaborator Author

henryiii commented Aug 5, 2024

Nevermind, bad error message. The select list has preview-only items in it, which are not in the schema.

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

No branches or pull requests

1 participant