Remove unsupported type_comment field
<!-- 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 `type_comment` field which our parser doesn't support. <!-- 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:
@@ -79,13 +79,6 @@ impl<'a> AnyFunctionDefinition<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn type_comments(self) -> Option<&'a str> {
|
||||
match self {
|
||||
Self::FunctionDefinition(definition) => definition.type_comment.as_deref(),
|
||||
Self::AsyncFunctionDefinition(definition) => definition.type_comment.as_deref(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns `true` if this is [`Self::AsyncFunctionDefinition`]
|
||||
pub const fn is_async(self) -> bool {
|
||||
matches!(self, Self::AsyncFunctionDefinition(_))
|
||||
|
||||
Reference in New Issue
Block a user