mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-26 18:06:43 +00:00
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:
parent
64fe7d30a3
commit
9ca632c84f
13 changed files with 28 additions and 79 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue