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:
Micha Reiser 2023-08-01 13:10:07 +02:00 committed by GitHub
parent 7c7231db2e
commit f45e8645d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 15156 additions and 15587 deletions

View file

@ -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),
}
}
}

View file

@ -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)])
}
}

View file

@ -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)])
}
}