Skip to content

Commit 1a0704e

Browse files
DimitriPapadopoulosmattip
authored andcommitted
Apply ruff/flake8-simplify rule SIM118
SIM118 Use `key in dict` instead of `key in dict.keys()`
1 parent 13c081f commit 1a0704e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

testing/cffi1/test_new_ffi_1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ def test_import_from_lib(self):
18111811
# equivalent to "import ffi, lib"
18121812
d = {}
18131813
exec("from _test_import_from_lib import *", d)
1814-
assert (sorted([x for x in d.keys() if not x.startswith('__')]) ==
1814+
assert (sorted(x for x in d if not x.startswith('__')) ==
18151815
['ffi', 'lib'])
18161816

18171817
def test_char16_t(self):

0 commit comments

Comments
 (0)