-
-
Notifications
You must be signed in to change notification settings - Fork 11k
MAINT: Enable linting with ruff E501 #29250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -294,13 +294,17 @@ def test_exceptions(self): | |
assert_raises(ValueError, concatenate, ()) | ||
|
||
@pytest.mark.slow | ||
@pytest.mark.skipif(sys.maxsize < 2**32, reason="only problematic on 64bit platforms") | ||
@pytest.mark.skipif( | ||
sys.maxsize < 2**32, | ||
reason="only problematic on 64bit platforms" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also out of scope, but shouldn't this be "32bit platforms" 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the condition we want is to have On my system (64-bit windows) the
Maybe because the amount of memory I have is not enough. I'll happily leave this to another PR though! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
yea, probably for the best |
||
) | ||
@requires_memory(2 * np.iinfo(np.intc).max) | ||
def test_huge_list_error(self): | ||
a = np.array([1]) | ||
max_int = np.iinfo(np.intc).max | ||
arrs = (a,) * (max_int + 1) | ||
msg = fr"concatenate\(\) only supports up to {max_int} arrays but got {max_int + 1}." | ||
msg = (fr"concatenate\(\) only supports up to {max_int} arrays" | ||
f" but got {max_int + 1}.") | ||
with pytest.raises(ValueError, match=msg): | ||
np.concatenate(arrs) | ||
|
||
|
@@ -379,7 +383,10 @@ def test_concatenate(self): | |
assert_(out is rout) | ||
assert_equal(res, rout) | ||
|
||
@pytest.mark.skipif(IS_PYPY, reason="PYPY handles sq_concat, nb_add differently than cpython") | ||
@pytest.mark.skipif( | ||
IS_PYPY, | ||
reason="PYPY handles sq_concat, nb_add differently than cpython" | ||
) | ||
def test_operator_concat(self): | ||
import operator | ||
a = array([1, 2]) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
32 bit platforms have
sys.maxsize == 2**31 - 1
, but I guess this also works :P