docs: 📝 Updating the example for `assert(S101)` (#6986)

<!--
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

Rewriting the `if`-comparison to focus on the meaning of rule ` assert
S101`.

Fixes #6984

## Test Plan

<!-- How was it tested? -->

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
Anselm Hahn 2023-08-29 23:08:08 +02:00 committed by GitHub
parent f3aaf84a28
commit dc4db39f78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,10 @@ use ruff_text_size::Ranged;
///
/// Use instead:
/// ```python
/// if not x > 0:
/// raise ValueError("Expected positive value.")
///
/// # or even better:
/// if x <= 0:
/// raise ValueError("Expected positive value.")
/// ```