mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-19 01:50:38 +00:00
Set a default on PythonVersion
(#6446)
## Summary I think it makes sense for `PythonVersion::default()` to return our minimum-supported non-EOL version. ## Test Plan `cargo test` --------- Co-authored-by: Zanie <contact@zanie.dev>
This commit is contained in:
parent
e4f57434a2
commit
38b9fb8bbd
4 changed files with 17 additions and 6 deletions
|
@ -20,6 +20,7 @@ use ruff::rules::{
|
|||
};
|
||||
use ruff::settings::configuration::Configuration;
|
||||
use ruff::settings::options::Options;
|
||||
use ruff::settings::types::PythonVersion;
|
||||
use ruff::settings::{defaults, flags, Settings};
|
||||
use ruff_python_ast::PySourceType;
|
||||
use ruff_python_codegen::Stylist;
|
||||
|
@ -134,7 +135,7 @@ impl Workspace {
|
|||
line_length: Some(LineLength::default()),
|
||||
select: Some(defaults::PREFIXES.to_vec()),
|
||||
tab_size: Some(TabSize::default()),
|
||||
target_version: Some(defaults::TARGET_VERSION),
|
||||
target_version: Some(PythonVersion::default()),
|
||||
// Ignore a bunch of options that don't make sense in a single-file editor.
|
||||
cache_dir: None,
|
||||
exclude: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue