Skip to content

Commit

Permalink
Get ctype_frame.py into mypy compliance.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdleary committed Apr 28, 2024
1 parent 7d180ce commit 22367a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions presubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

subprocess.check_call([
'mypy',
'src/echo/ctype_frame.py',
'src/echo/efunction_type.py',
'src/echo/frame_objects.py',
'src/echo/__init__.py',
Expand Down
4 changes: 2 additions & 2 deletions src/echo/ctype_frame.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ctypes
import sys
import types
from typing import Any
from typing import Any, cast

from echo import trace_util

Expand Down Expand Up @@ -113,7 +113,7 @@ def get_stack_top(self):
return self.frame_ptr[self.offsets['f_stacktop']]

def print_block_stack(self, printer) -> None:
version = tuple(sys.version_info[:2])
version = cast(tuple[int, int], tuple(sys.version_info[:2]))
iblock_offset = self.VERSION_TO_FRAME_IBLOCK_OFFSET[version]
frame_uints = ctypes.cast(
self.frame_id,
Expand Down

0 comments on commit 22367a6

Please sign in to comment.