Skip to content

Commit fea5c93

Browse files
authored
1 parent a8bd273 commit fea5c93

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

mypy/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ def read_types_packages_to_install(cache_dir: str, after_run: bool) -> list[str]
14981498
# No missing stubs.
14991499
return []
15001500
with open(fnam) as f:
1501-
return [line.strip() for line in f.readlines()]
1501+
return [line.strip() for line in f]
15021502

15031503

15041504
def install_types(

mypy/stubtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1667,7 +1667,7 @@ def strip_comments(s: str) -> str:
16671667
return s.strip()
16681668

16691669
with open(allowlist_file) as f:
1670-
for line in f.readlines():
1670+
for line in f:
16711671
entry = strip_comments(line)
16721672
if entry:
16731673
yield entry

mypyc/irbuild/expression.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -812,10 +812,10 @@ def transform_basic_comparison(
812812
if (
813813
is_int_rprimitive(left.type)
814814
and is_int_rprimitive(right.type)
815-
and op in int_comparison_op_mapping.keys()
815+
and op in int_comparison_op_mapping
816816
):
817817
return builder.compare_tagged(left, right, op, line)
818-
if is_fixed_width_rtype(left.type) and op in int_comparison_op_mapping.keys():
818+
if is_fixed_width_rtype(left.type) and op in int_comparison_op_mapping:
819819
if right.type == left.type:
820820
op_id = ComparisonOp.signed_ops[op]
821821
return builder.builder.comparison_op(left, right, op_id, line)
@@ -826,7 +826,7 @@ def transform_basic_comparison(
826826
)
827827
elif (
828828
is_fixed_width_rtype(right.type)
829-
and op in int_comparison_op_mapping.keys()
829+
and op in int_comparison_op_mapping
830830
and isinstance(left, Integer)
831831
):
832832
op_id = ComparisonOp.signed_ops[op]

0 commit comments

Comments
 (0)