mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-18 01:20:40 +00:00
Remove unused parser modes
<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary This PR removes the `Interactive` and `FunctionType` parser modes that are unused by ruff <!-- What's the purpose of the change? What does it do, and why? --> ## Test Plan `cargo test` <!-- How was it tested? -->
This commit is contained in:
parent
7c7231db2e
commit
f45e8645d7
15 changed files with 15156 additions and 15587 deletions
|
@ -4,8 +4,6 @@ use ruff_formatter::{Format, FormatOwnedWithRule, FormatRefWithRule, FormatResul
|
|||
use ruff_python_ast::Mod;
|
||||
|
||||
pub(crate) mod mod_expression;
|
||||
pub(crate) mod mod_function_type;
|
||||
pub(crate) mod mod_interactive;
|
||||
pub(crate) mod mod_module;
|
||||
|
||||
#[derive(Default)]
|
||||
|
@ -15,9 +13,7 @@ impl FormatRule<Mod, PyFormatContext<'_>> for FormatMod {
|
|||
fn fmt(&self, item: &Mod, f: &mut PyFormatter) -> FormatResult<()> {
|
||||
match item {
|
||||
Mod::Module(x) => x.format().fmt(f),
|
||||
Mod::Interactive(x) => x.format().fmt(f),
|
||||
Mod::Expression(x) => x.format().fmt(f),
|
||||
Mod::FunctionType(x) => x.format().fmt(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
use crate::{not_yet_implemented, FormatNodeRule, PyFormatter};
|
||||
use ruff_formatter::{write, Buffer, FormatResult};
|
||||
use ruff_python_ast::ModFunctionType;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct FormatModFunctionType;
|
||||
|
||||
impl FormatNodeRule<ModFunctionType> for FormatModFunctionType {
|
||||
fn fmt_fields(&self, item: &ModFunctionType, f: &mut PyFormatter) -> FormatResult<()> {
|
||||
write!(f, [not_yet_implemented(item)])
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
use crate::{not_yet_implemented, FormatNodeRule, PyFormatter};
|
||||
use ruff_formatter::{write, Buffer, FormatResult};
|
||||
use ruff_python_ast::ModInteractive;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct FormatModInteractive;
|
||||
|
||||
impl FormatNodeRule<ModInteractive> for FormatModInteractive {
|
||||
fn fmt_fields(&self, item: &ModInteractive, f: &mut PyFormatter) -> FormatResult<()> {
|
||||
write!(f, [not_yet_implemented(item)])
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue