Skip to content

Commit 0c05587

Browse files
DimitriPapadopoulosadrienverge
authored andcommitted
style: Apply ruff/flake8-simplify rule SIM118
SIM118 Use `key in dict` instead of `key in dict.keys()`
1 parent 999d5fd commit 0c05587

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def unregister_test_codecs():
101101

102102

103103
def is_test_codec(codec):
104-
return codec in test_codec_infos.keys()
104+
return codec in test_codec_infos
105105

106106

107107
def built_in_equivalent_of_test_codec(test_codec):

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ def test_valid_encodings(self):
891891
}
892892

893893
with temp_workspace(workspace):
894-
for config_path in config_files.keys():
894+
for config_path in config_files:
895895
# First, make sure that encoding autodetection works when the
896896
# file’s path is given as a command-line argument.
897897
with RunContext(self) as ctx:

0 commit comments

Comments
 (0)