GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — gh-120417: Add #noqa to load_tests() in tests by vstinner · Pull Request #120626 · python/cpython Conversation
|
|
Could you add/link an explanation about what In my projects, I've avoided these warning by adding public names to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
It's a "standard" linter command to ignore "imported but unused" warning on the current line. It was discussed at #120421. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Could you add an exception for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I have no idea on how to do that. @AlexWaygood: Is it something supported by Ruff by example? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
we support ignoring certain errors for filenames that match certain patterns. But I don't think we support ignoring F401 for specific symbols, no. It might be a reasonable feature request. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Can it be ignored for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, in Ruff you can do that via the CLI using [tool.ruff.lint.per-file-ignores] "Lib/test/*/**/__main__.py" = ["F401"] Or this in a [lint.per-file-ignores] "Lib/test/*/**/__main__.py" = ["F401"] |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
It means that other unused imports can no longer be catched. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
In total, |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.