Remove parser dependency from ruff-python-ast (#6096)

This commit is contained in:
Micha Reiser
2023-07-26 17:47:22 +02:00
committed by GitHub
parent 99127243f4
commit 2cf00fee96
658 changed files with 1714 additions and 1546 deletions

View File

@@ -26,11 +26,12 @@ doc = false
ruff = { path = "../ruff", features = ["clap"] }
ruff_cache = { path = "../ruff_cache" }
ruff_diagnostics = { path = "../ruff_diagnostics" }
ruff_macros = { path = "../ruff_macros" }
ruff_python_ast = { path = "../ruff_python_ast" }
ruff_python_formatter = { path = "../ruff_python_formatter" }
ruff_source_file = { path = "../ruff_source_file" }
ruff_python_trivia = { path = "../ruff_python_trivia" }
ruff_text_size = { workspace = true }
ruff_textwrap = { path = "../ruff_textwrap" }
ruff_macros = { path = "../ruff_macros" }
annotate-snippets = { version = "0.9.1", features = ["color"] }
anyhow = { workspace = true }

View File

@@ -16,7 +16,7 @@ use ruff::warn_user;
use ruff_cache::{CacheKey, CacheKeyHasher};
use ruff_diagnostics::{DiagnosticKind, Fix};
use ruff_python_ast::imports::ImportMap;
use ruff_python_ast::source_code::SourceFileBuilder;
use ruff_source_file::SourceFileBuilder;
use ruff_text_size::{TextRange, TextSize};
use crate::diagnostics::Diagnostics;

View File

@@ -20,7 +20,7 @@ use ruff::settings::{flags, AllSettings};
use ruff::{fs, packaging, resolver, warn_user_once, IOError};
use ruff_diagnostics::Diagnostic;
use ruff_python_ast::imports::ImportMap;
use ruff_python_ast::source_code::SourceFileBuilder;
use ruff_source_file::SourceFileBuilder;
use crate::args::Overrides;
use crate::cache::{self, Cache};

View File

@@ -29,8 +29,8 @@ use ruff::{fs, IOError};
use ruff_diagnostics::Diagnostic;
use ruff_macros::CacheKey;
use ruff_python_ast::imports::ImportMap;
use ruff_python_ast::source_code::{LineIndex, SourceCode, SourceFileBuilder};
use ruff_python_stdlib::path::{is_jupyter_notebook, is_project_toml};
use ruff_source_file::{LineIndex, SourceCode, SourceFileBuilder};
#[derive(CacheKey)]
pub(crate) struct FileCacheKey {