Skip to content

Commit 19ac7b2

Browse files
committed
[ruff] Fix dict.get(x, None) invocations
1 parent fa7b08b commit 19ac7b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

loopy/check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1359,7 +1359,7 @@ def check_for_nested_base_storage(kernel: LoopKernel) -> None:
13591359

13601360
for ary in kernel.temporary_variables.values():
13611361
if ary.base_storage:
1362-
storage_array = name_to_array.get(ary.base_storage, None)
1362+
storage_array = name_to_array.get(ary.base_storage)
13631363

13641364
if storage_array is None:
13651365
raise LoopyError("Nothing known about storage array "

loopy/kernel/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ def get_auto_axis_iname_ranking_by_stride(kernel, insn):
857857
if var.name in auto_axis_inames:
858858
# excludes '1', i.e. the constant
859859
new_stride = coeff*stride
860-
old_stride = iname_to_stride_expr.get(var.name, None)
860+
old_stride = iname_to_stride_expr.get(var.name)
861861
if old_stride is None or new_stride < old_stride:
862862
iname_to_stride_expr[var.name] = new_stride
863863

0 commit comments

Comments
 (0)