mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 05:25:17 +00:00
docs(SIM114): fix typo in example Python code (#2884)
This commit is contained in:
parent
4dd2032687
commit
b8483975a4
1 changed files with 3 additions and 3 deletions
|
@ -118,15 +118,15 @@ define_violation!(
|
|||
///
|
||||
/// ### Example
|
||||
/// ```python
|
||||
/// if x = 1:
|
||||
/// if x == 1:
|
||||
/// print("Hello")
|
||||
/// elif x = 2:
|
||||
/// elif x == 2:
|
||||
/// print("Hello")
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
/// ```python
|
||||
/// if x = 1 or x = 2:
|
||||
/// if x == 1 or x == 2:
|
||||
/// print("Hello")
|
||||
/// ```
|
||||
pub struct IfWithSameArms;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue