Skip to content

Commit

Permalink
add Fix safety section
Browse files Browse the repository at this point in the history
  • Loading branch information
ntBre committed Jan 30, 2025
1 parent 2dd8e5f commit ec87c38
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ use super::{
/// type PositiveInt = Annotated[int, Gt(0)]
/// ```
///
/// ## Fix safety
///
/// This fix is marked unsafe for `TypeAlias` assignments outside of stub files because of the
/// runtime behavior around `isinstance()` calls noted above. The fix is also unsafe for
/// `TypeAliasType` assignments if there are any comments in the replacement range that would be
/// deleted.
///
/// [PEP 695]: https://peps.python.org/pep-0695/
#[derive(ViolationMetadata)]
pub(crate) struct NonPEP695TypeAlias {
Expand Down

0 comments on commit ec87c38

Please sign in to comment.