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

Invalid JSON schema on ruff isort settings #4218

Closed
ddahan opened this issue May 4, 2023 · 3 comments
Closed

Invalid JSON schema on ruff isort settings #4218

ddahan opened this issue May 4, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ddahan
Copy link

ddahan commented May 4, 2023

Is there any reason I get this warning in my pyproject.toml file, using VS Code?
It seems it's related to the corresponding JSON Schema.

image

Here are below the textual code and error (for SEO, accessibility, copy pasting, etc.)

Code:

[tool.ruff]
line-length = 90
target-version = "py311"
exclude = ["migrations", "__pycache__"]
per-file-ignores = {}

[tool.ruff.mccabe]
max-complexity = 10 # Unlike Flake8, default to a complexity level of 10

[tool.ruff.isort]
known-first-party = ["common", "boilerplate", "simplevent"]
section-order = [
    "future",
    "standard-library",
    "third-party",
    "django",
    "first-party",
    "local-folder",
]
[tool.ruff.isort.sections]
"django" = ["django"]

Error:

{"known-first-party":["common","boilerplate","simplevent"],"section-order":["future","standard-library","third-party","django","first-party","local-folder"],"sections":{"django":["django"]}} is not valid under any of the given schemas

Ruff settings: default
Ruff version: 0.0.264

@ddahan ddahan changed the title VS Code warning on valid ruff isort settings Invalid JSON schema on valid ruff isort settings May 4, 2023
@ddahan ddahan changed the title Invalid JSON schema on valid ruff isort settings Invalid JSON schema on ruff isort settings May 4, 2023
@charliermarsh charliermarsh self-assigned this May 4, 2023
@charliermarsh charliermarsh added the bug Something isn't working label May 4, 2023
@charliermarsh
Copy link
Member

I think the issue here is that we need to update the JSON schema manually in the Schema Store, which is a separate GitHub repo, so from time to time the VS Code validation gets out-of-sync with the true settings schema. I can update it today.

@dhruvmanila
Copy link
Member

A PR is already in progress: SchemaStore/schemastore#2923

@charliermarsh
Copy link
Member

Will be fixed by SchemaStore/schemastore#2945.

MichaReiser pushed a commit that referenced this issue Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants