mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 06:49:25 +00:00
style: add pyupgrade check, 2.7+
This commit is contained in:
committed by
Henry Schreiner
parent
11e12fe455
commit
0e2e003508
@@ -65,7 +65,7 @@ def test_set(capture, doc):
|
||||
"""
|
||||
)
|
||||
|
||||
assert not m.set_contains(set([]), 42)
|
||||
assert not m.set_contains(set(), 42)
|
||||
assert m.set_contains({42}, 42)
|
||||
assert m.set_contains({"foo"}, "foo")
|
||||
|
||||
@@ -448,7 +448,7 @@ def test_memoryview(method, args, fmt, expected_view):
|
||||
view_as_list = list(view)
|
||||
else:
|
||||
# Using max to pick non-zero byte (big-endian vs little-endian).
|
||||
view_as_list = [max([ord(c) for c in s]) for s in view]
|
||||
view_as_list = [max(ord(c) for c in s) for s in view]
|
||||
assert view_as_list == list(expected_view)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user