Describe the bug
Ruff runs as an action on save, even if I don't tell it to. I literally have all boxes in the Ruff settings page unchecked. Worst of all, however, the context action for organizing imports, and the action on save disagree on the correct import formatting for the snippet:
from pathlib import Path
from typing import Any
import click
import matplotlib.pyplot as plt
import numpy as np
from my_package.utils import MyObject
With one suggesting a line between numpy and my_package imports while the other keeps removing the line. This only happens when I use top-level imports from my_package, i.e. the issue is resolved with from .utils import
.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
When I turn off Run ruff on save
and Run ruff when reformat code
, Ruff should never run automatically to fix my code. Also, the action on save is incorrect in this case, I believe, in suggesting removing the line between imports from my_package and third party software. This should be fixed.
Screenshots
This is my ruff tool pane:
This is what the action on save formats it to (Ruff thinks this is wrong):
This is what it should look like:
Environments (please complete the following information):
Additional context
Add any other context about the problem here.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too