Skip to content

Commit 8a07615

Browse files
yoneyfacebook-github-bot
authored andcommitted
Address type errors
Summary: Address type errors. Reviewed By: alexmalyshev Differential Revision: D82132143 fbshipit-source-id: 4d51517b01dd4e94c43b97e90dafe27f789c425c
1 parent 10c9634 commit 8a07615

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cinderx/PythonLib/cinderx/compiler/pyassem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ def has_no_lineno(self) -> bool:
496496

497497
@property
498498
def exits(self) -> bool:
499-
return len(self.insts) and self.insts[-1].opname in SCOPE_EXIT_OPCODES
499+
return len(self.insts) > 0 and self.insts[-1].opname in SCOPE_EXIT_OPCODES
500500

501501
def copy(self) -> Block:
502502
# Cannot copy block if it has fallthrough, since a block can have only one
@@ -2303,7 +2303,7 @@ class PyFlowGraphCinder312(PyFlowGraphCinderMixin, PyFlowGraph312):
23032303

23042304
class PyFlowGraph314(PyFlowGraph312):
23052305
flow_graph_optimizer = FlowGraphOptimizer314
2306-
_constant_idx = {
2306+
_constant_idx: dict[object, int] = {
23072307
AssertionError: 0,
23082308
NotImplementedError: 1,
23092309
tuple: 2,

0 commit comments

Comments
 (0)