Repository navigation
allowed-unused-imports has incorrect documentation #13668
Description
Activity
We should allow defining this either at
lintorlint.pyflakesfrom my read of the code.
I presume the schema store has just not been updated since the last release.Typo fix at #13669
Reacted by Tyler C Laprade, CFA- addedquestionAn issue asking for support or clarificationAn issue asking for support or clarification
on Oct 7, 2024 Thanks! Is there precedent for allowing other settings at two different levels? It seems a bit confusing.
I'm not sure honestly. It does seem confusing if it's not necessary for some reason. cc @charliermarsh who reviewed that contribution.
It should only be under lint.pyflakes.
Reacted by Tyler C Laprade, CFA- added a commit that references this issue
on Oct 8, 2024 - added a commit that references this issue
on Oct 17, 2024 @tylerlaprade I'm unable to reproduce this. I created a
.ruff.tomlfile and opened it in VS Code with even better toml installed. It provides me intelli sense and auto suggestions. Any chance you manually selected an old schema in Better toml forruff.tomlfiles?@MichaReiser, hmm, these are the three options it gives me. I don't know how to distinguish between them. All three seem to have the same problem, though.
What's the exact error message from the schema? Can you try commenting out all settings and then, one by one (or doing a binary search where you comment in 50%) comment in the sections? Do you see the same in a
pyproject.toml?Oh! Good idea - it was hard to tell which line was problematic since all occurrences of
lintwere squiggled, but the problem seems to come solely fromextend-safe-fixes = ["ANN", "C4", "EM", "RET", "SIM", "TCH", "UP"]. Was that setting deprecated?The setting wasn't deprecated but
TCHwas renamed toTC(blog) and this seems to be causing the issue.I see you just solved it. Nice. Yeah, our error reporting for the lint section is unfortunate because we use some functionality to avoid repeating all options globally and under
lintand it doesn't seem to be that well supportedReacted by Tyler C Laprade, CFA- added a commit that references this issue
on May 1, 2026
lintsection rather thanlint.pyflakes