Stabilize adding future import via config option (#20277)

Introduced in #19100. Removed gating, updated tests, removed warning(s),
and updated documentation.
This commit is contained in:
Dylan 2025-09-08 09:19:39 -05:00 committed by Brent Westbrook
parent 64fe7d30a3
commit 9ca632c84f
13 changed files with 28 additions and 79 deletions

View file

@ -257,12 +257,6 @@ impl Configuration {
conflicting_import_settings(&isort, &flake8_import_conventions)?;
let future_annotations = lint.future_annotations.unwrap_or_default();
if lint_preview.is_disabled() && future_annotations {
warn_user_once!(
"The `lint.future-annotations` setting will have no effect \
because `preview` is disabled"
);
}
Ok(Settings {
cache_dir: self

View file

@ -537,8 +537,6 @@ pub struct LintOptions {
/// For example, `TC001`, `TC002`, and `TC003` can move more imports into `TYPE_CHECKING` blocks
/// if `__future__` annotations are enabled.
///
/// This setting is currently in [preview](https://docs.astral.sh/ruff/preview/) and requires
/// preview mode to be enabled to have any effect.
#[option(
default = "false",
value_type = "bool",