Skip to content

Commit

Permalink
Update trapz and in1d deprecation for NPY201
Browse files Browse the repository at this point in the history
  • Loading branch information
dedebenui committed Jun 20, 2024
1 parent a26bd01 commit 5fb9e50
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions crates/ruff_linter/src/rules/numpy/rules/numpy_2_0_deprecation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,14 @@ pub(crate) fn numpy_2_0_deprecation(checker: &mut Checker, expr: &Expr) {
guideline: Some("Use the `np.errstate` context manager instead."),
},
}),
["numpy", "in1d"] => Some(Replacement {
existing: "in1d",
details: Details::AutoImport {
path: "numpy",
name: "isin",
compatibility: Compatibility::BackwardsCompatible,
},
}),
["numpy", "INF"] => Some(Replacement {
existing: "INF",
details: Details::AutoImport {
Expand Down Expand Up @@ -536,6 +544,14 @@ pub(crate) fn numpy_2_0_deprecation(checker: &mut Checker, expr: &Expr) {
compatibility: Compatibility::BackwardsCompatible,
},
}),
["numpy", "trapz"] => Some(Replacement {
existing: "trapz",
details: Details::AutoImport {
path: "numpy",
name: "trapezoid",
compatibility: Compatibility::Breaking,
},
}),
["numpy", "unicode_"] => Some(Replacement {
existing: "unicode_",
details: Details::AutoImport {
Expand Down

0 comments on commit 5fb9e50

Please sign in to comment.