Skip to content

Commit

Permalink
Bump max iterations to 12
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Jun 27, 2024
1 parent 38ca9b8 commit 8726e6e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -998,13 +998,16 @@ NPY201.py:122:5: NPY201 [*] `np.AxisError` will be removed in NumPy 2.0. Use `nu
123 |+ AxisError
123 124 |
124 125 | np.ComplexWarning
125 126 |

NPY201.py:124:5: NPY201 [*] `np.ComplexWarning` will be removed in NumPy 2.0. Use `numpy.exceptions.ComplexWarning` instead.
|
122 | np.AxisError
123 |
124 | np.ComplexWarning
| ^^^^^^^^^^^^^^^^^ NPY201
125 |
126 | np.compare_chararrays
|
= help: Replace with `numpy.exceptions.ComplexWarning`

Expand All @@ -1019,3 +1022,26 @@ NPY201.py:124:5: NPY201 [*] `np.ComplexWarning` will be removed in NumPy 2.0. Us
123 124 |
124 |- np.ComplexWarning
125 |+ ComplexWarning
125 126 |
126 127 | np.compare_chararrays

NPY201.py:126:5: NPY201 [*] `np.compare_chararrays` will be removed in NumPy 2.0. Use `numpy.char.compare_chararrays` instead.
|
124 | np.ComplexWarning
125 |
126 | np.compare_chararrays
| ^^^^^^^^^^^^^^^^^^^^^ NPY201
|
= help: Replace with `numpy.char.compare_chararrays`

ℹ Safe fix
1 |+from numpy.char import compare_chararrays
1 2 | def func():
2 3 | import numpy as np
3 4 |
--------------------------------------------------------------------------------
123 124 |
124 125 | np.ComplexWarning
125 126 |
126 |- np.compare_chararrays
127 |+ compare_chararrays
2 changes: 1 addition & 1 deletion crates/ruff_linter/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub fn test_snippet(contents: &str, settings: &LinterSettings) -> Vec<Message> {
}

thread_local! {
static MAX_ITERATIONS: std::cell::Cell<usize> = const { std::cell::Cell::new(10) };
static MAX_ITERATIONS: std::cell::Cell<usize> = const { std::cell::Cell::new(12) };
}

pub fn set_max_iterations(max: usize) {
Expand Down

0 comments on commit 8726e6e

Please sign in to comment.