Skip to content

Commit

Permalink
Fix rendering of FURB188 docs (#13406)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser authored Sep 19, 2024
1 parent cf1e91b commit d3530ab
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ use ruff_text_size::{Ranged, TextLen};
/// the string to a slice after checking `.startswith()` or `.endswith()`, respectively.
///
/// ## Why is this bad?
/// The methods [`str.removeprefix`] and [`str.removesuffix`],
/// The methods [`str.removeprefix`](https://docs.python.org/3/library/stdtypes.html#str.removeprefix)
/// and [`str.removesuffix`](https://docs.python.org/3/library/stdtypes.html#str.removesuffix),
/// introduced in Python 3.9, have the same behavior
/// and are more readable and efficient.
///
Expand All @@ -33,9 +34,6 @@ use ruff_text_size::{Ranged, TextLen};
/// ```python
/// text = text.removeprefix("pre")
/// ```
///
/// [`str.removeprefix`]: https://docs.python.org/3/library/stdtypes.html#str.removeprefix
/// [`str.removesuffix`]: https://docs.python.org/3/library/stdtypes.html#str.removesuffix
#[violation]
pub struct SliceToRemovePrefixOrSuffix {
string: String,
Expand Down

0 comments on commit d3530ab

Please sign in to comment.