mirror of https://github.com/astral-sh/ruff
Update `trapz` and `in1d` deprecation for NPY201 (#11948)
This commit is contained in:
parent
3ab7a8da73
commit
9fd84e63bc
|
|
@ -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."),
|
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 {
|
["numpy", "INF"] => Some(Replacement {
|
||||||
existing: "INF",
|
existing: "INF",
|
||||||
details: Details::AutoImport {
|
details: Details::AutoImport {
|
||||||
|
|
@ -536,6 +544,14 @@ pub(crate) fn numpy_2_0_deprecation(checker: &mut Checker, expr: &Expr) {
|
||||||
compatibility: Compatibility::BackwardsCompatible,
|
compatibility: Compatibility::BackwardsCompatible,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
["numpy", "trapz"] => Some(Replacement {
|
||||||
|
existing: "trapz",
|
||||||
|
details: Details::AutoImport {
|
||||||
|
path: "numpy",
|
||||||
|
name: "trapezoid",
|
||||||
|
compatibility: Compatibility::Breaking,
|
||||||
|
},
|
||||||
|
}),
|
||||||
["numpy", "unicode_"] => Some(Replacement {
|
["numpy", "unicode_"] => Some(Replacement {
|
||||||
existing: "unicode_",
|
existing: "unicode_",
|
||||||
details: Details::AutoImport {
|
details: Details::AutoImport {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue