mirror of https://github.com/astral-sh/ruff
[`ruff`] add fix safety section (`RUF057`) (#17483)
The PR add the `fix safety` section for rule `RUF057` (#15584 )
This commit is contained in:
parent
6044f04137
commit
4bcf1778fa
|
|
@ -27,6 +27,12 @@ use ruff_text_size::Ranged;
|
||||||
/// ```python
|
/// ```python
|
||||||
/// a = 1
|
/// a = 1
|
||||||
/// ```
|
/// ```
|
||||||
|
///
|
||||||
|
/// ## Fix safety
|
||||||
|
///
|
||||||
|
/// The fix is marked unsafe if it is not possible to guarantee that the first argument of
|
||||||
|
/// `round()` is of type `int`, or if the fix deletes comments.
|
||||||
|
///
|
||||||
#[derive(ViolationMetadata)]
|
#[derive(ViolationMetadata)]
|
||||||
pub(crate) struct UnnecessaryRound;
|
pub(crate) struct UnnecessaryRound;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue