Skip to content

Commit

Permalink
Clippy, other code cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed May 4, 2023
1 parent 8088a3c commit 50a921e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::rules::pycodestyle::rules::logical_lines::LogicalLine;
use ruff_diagnostics::Violation;
use ruff_macros::{derive_message_formats, violation};
use ruff_python_ast::token_kind::TokenKind;
use ruff_text_size::TextRange;


#[violation]
pub struct MissingWhitespaceAfterKeyword;
Expand Down
4 changes: 0 additions & 4 deletions crates/ruff/src/rules/pycodestyle/rules/logical_lines/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,6 @@ impl<'a> LogicalLine<'a> {
.slice(TextRange::new(token.end(), last_token.end()))
}

pub fn token_text(&self, token: &'a LogicalLineToken) -> &str {
self.lines.locator.slice(token.range)
}

/// Returns the text before `token`
#[inline]
pub fn text_before(&self, token: &'a LogicalLineToken) -> &str {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::rules::pycodestyle::rules::logical_lines::{LogicalLine, LogicalLineTo
use ruff_diagnostics::Violation;
use ruff_macros::{derive_message_formats, violation};
use ruff_python_ast::token_kind::TokenKind;
use ruff_text_size::{TextLen, TextRange, TextSize};
use ruff_text_size::{TextRange, TextSize};

#[violation]
pub struct UnexpectedSpacesAroundKeywordParameterEquals;
Expand Down

0 comments on commit 50a921e

Please sign in to comment.