mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-04 01:20:57 +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
|
@ -41,46 +41,6 @@ impl<'ast> IntoFormat<PyFormatContext<'ast>> for ast::ModModule {
|
|||
}
|
||||
}
|
||||
|
||||
impl FormatRule<ast::ModInteractive, PyFormatContext<'_>>
|
||||
for crate::module::mod_interactive::FormatModInteractive
|
||||
{
|
||||
#[inline]
|
||||
fn fmt(
|
||||
&self,
|
||||
node: &ast::ModInteractive,
|
||||
f: &mut Formatter<PyFormatContext<'_>>,
|
||||
) -> FormatResult<()> {
|
||||
FormatNodeRule::<ast::ModInteractive>::fmt(self, node, f)
|
||||
}
|
||||
}
|
||||
impl<'ast> AsFormat<PyFormatContext<'ast>> for ast::ModInteractive {
|
||||
type Format<'a> = FormatRefWithRule<
|
||||
'a,
|
||||
ast::ModInteractive,
|
||||
crate::module::mod_interactive::FormatModInteractive,
|
||||
PyFormatContext<'ast>,
|
||||
>;
|
||||
fn format(&self) -> Self::Format<'_> {
|
||||
FormatRefWithRule::new(
|
||||
self,
|
||||
crate::module::mod_interactive::FormatModInteractive::default(),
|
||||
)
|
||||
}
|
||||
}
|
||||
impl<'ast> IntoFormat<PyFormatContext<'ast>> for ast::ModInteractive {
|
||||
type Format = FormatOwnedWithRule<
|
||||
ast::ModInteractive,
|
||||
crate::module::mod_interactive::FormatModInteractive,
|
||||
PyFormatContext<'ast>,
|
||||
>;
|
||||
fn into_format(self) -> Self::Format {
|
||||
FormatOwnedWithRule::new(
|
||||
self,
|
||||
crate::module::mod_interactive::FormatModInteractive::default(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl FormatRule<ast::ModExpression, PyFormatContext<'_>>
|
||||
for crate::module::mod_expression::FormatModExpression
|
||||
{
|
||||
|
@ -121,46 +81,6 @@ impl<'ast> IntoFormat<PyFormatContext<'ast>> for ast::ModExpression {
|
|||
}
|
||||
}
|
||||
|
||||
impl FormatRule<ast::ModFunctionType, PyFormatContext<'_>>
|
||||
for crate::module::mod_function_type::FormatModFunctionType
|
||||
{
|
||||
#[inline]
|
||||
fn fmt(
|
||||
&self,
|
||||
node: &ast::ModFunctionType,
|
||||
f: &mut Formatter<PyFormatContext<'_>>,
|
||||
) -> FormatResult<()> {
|
||||
FormatNodeRule::<ast::ModFunctionType>::fmt(self, node, f)
|
||||
}
|
||||
}
|
||||
impl<'ast> AsFormat<PyFormatContext<'ast>> for ast::ModFunctionType {
|
||||
type Format<'a> = FormatRefWithRule<
|
||||
'a,
|
||||
ast::ModFunctionType,
|
||||
crate::module::mod_function_type::FormatModFunctionType,
|
||||
PyFormatContext<'ast>,
|
||||
>;
|
||||
fn format(&self) -> Self::Format<'_> {
|
||||
FormatRefWithRule::new(
|
||||
self,
|
||||
crate::module::mod_function_type::FormatModFunctionType::default(),
|
||||
)
|
||||
}
|
||||
}
|
||||
impl<'ast> IntoFormat<PyFormatContext<'ast>> for ast::ModFunctionType {
|
||||
type Format = FormatOwnedWithRule<
|
||||
ast::ModFunctionType,
|
||||
crate::module::mod_function_type::FormatModFunctionType,
|
||||
PyFormatContext<'ast>,
|
||||
>;
|
||||
fn into_format(self) -> Self::Format {
|
||||
FormatOwnedWithRule::new(
|
||||
self,
|
||||
crate::module::mod_function_type::FormatModFunctionType::default(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl FormatRule<ast::StmtFunctionDef, PyFormatContext<'_>>
|
||||
for crate::statement::stmt_function_def::FormatStmtFunctionDef
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue