Skip to content

Commit 7621359

Browse files
Fix indentation, remove extra check
1 parent e40e580 commit 7621359

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

Lib/test/test_capi/test_opt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,7 @@ def f(n):
15311531
# But all of the appends we care about are still there:
15321532
self.assertEqual(uops.count("_CALL_LIST_APPEND"), len("ABCDEFG"))
15331533

1534-
def test_narrow_type_to_constant_str_empty(self):
1534+
def test_narrow_type_to_constant_str_empty(self):
15351535
def f(n):
15361536
trace = []
15371537
for i in range(n):
@@ -1564,7 +1564,7 @@ def f(n):
15641564
# But all of the appends we care about are still there:
15651565
self.assertEqual(uops.count("_CALL_LIST_APPEND"), len("ABCDEFG"))
15661566

1567-
def test_compare_pop_two_load_const_inline_borrow(self):
1567+
def test_compare_pop_two_load_const_inline_borrow(self):
15681568
def testfunc(n):
15691569
x = 0
15701570
for _ in range(n):

Python/optimizer_bytecodes.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,7 @@ dummy_func(void) {
446446
}
447447

448448
op(_COMPARE_OP_INT, (left, right -- res)) {
449-
if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
450-
sym_matches_type(left, &PyLong_Type) && sym_matches_type(right, &PyLong_Type))
449+
if (sym_is_const(ctx, left) && sym_is_const(ctx, right))
451450
{
452451
assert(PyLong_CheckExact(sym_get_const(ctx, left)));
453452
assert(PyLong_CheckExact(sym_get_const(ctx, right)));

Python/optimizer_cases.c.h

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)