[pyupgrade] Add fix safety section to docs (UP036) (#17444)

## Summary

add fix safety section to outdated_version_block, for #15584
This commit is contained in:
Hans 2025-04-18 10:45:53 +08:00 committed by GitHub
parent de8f4e62e2
commit c7372d218d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,6 +44,10 @@ use ruff_python_ast::PythonVersion;
/// ## Options
/// - `target-version`
///
/// ## Fix safety
/// This rule's fix is marked as unsafe because it will remove all code,
/// comments, and annotations within unreachable version blocks.
///
/// ## References
/// - [Python documentation: `sys.version_info`](https://docs.python.org/3/library/sys.html#sys.version_info)
#[derive(ViolationMetadata)]