mirror of https://github.com/astral-sh/ruff
[`pylint`] Clarify fix safety to include left-hand hashability (`PLR6201`) (#20518)
## Summary Fixes #20510
This commit is contained in:
parent
71d711257a
commit
caf48f4bfc
|
|
@ -25,9 +25,11 @@ use crate::{AlwaysFixableViolation, Edit, Fix};
|
||||||
///
|
///
|
||||||
/// ## Fix safety
|
/// ## Fix safety
|
||||||
/// This rule's fix is marked as unsafe, as the use of a `set` literal will
|
/// This rule's fix is marked as unsafe, as the use of a `set` literal will
|
||||||
/// error at runtime if the sequence contains unhashable elements (like lists
|
/// error at runtime if either the element being tested for membership (the
|
||||||
/// or dictionaries). While Ruff will attempt to infer the hashability of the
|
/// left-hand side) or any element of the sequence (the right-hand side)
|
||||||
/// elements, it may not always be able to do so.
|
/// is unhashable (like lists or dictionaries). While Ruff will attempt to
|
||||||
|
/// infer the hashability of both sides and skip the fix when it can determine
|
||||||
|
/// that either side is unhashable, it may not always be able to do so.
|
||||||
///
|
///
|
||||||
/// ## References
|
/// ## References
|
||||||
/// - [What’s New In Python 3.2](https://docs.python.org/3/whatsnew/3.2.html#optimizations)
|
/// - [What’s New In Python 3.2](https://docs.python.org/3/whatsnew/3.2.html#optimizations)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue