You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using vscode on a project with a conda environment using python 3.12. The conda environment is selected in vscode. When running Ruff: Format imports from the command palette, tomllib is moved with non-standard imports.
I think this will only work if the required Python version is 3.11 or greater as tomllib was added in that Python version. Can you share your pyproject.toml? You could also run ruff from the command-line with the --verbose flag which will provide which category an import is in:
[2024-05-20][11:53:16][ruff_linter::rules::isort::categorize][DEBUG] Categorized 'tomllib' as Known(StandardLibrary) (KnownStandardLibrary)
...to your pyproject.toml, to indicate that your project only supports Python 3.11 and later. Alternatively, you can tell Ruff to treat 3.11 as your minimum supported version with:
Hi,
I'm using vscode on a project with a conda environment using python 3.12. The conda environment is selected in vscode. When running
Ruff: Format imports
from the command palette,tomllib
is moved with non-standard imports.Before
Ruff: Format imports
:After
Ruff: Format imports
:The issue was raised here astral-sh/ruff#2343, and supposedly fixed here astral-sh/ruff#2345.
System information :
Do I have to take further action to fix the problem (configuration, ...) ?
Cheers !
The text was updated successfully, but these errors were encountered: