Skip to content

Commit

Permalink
cleanup tests for whether a python file is a user file or a library file
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenfreund committed May 14, 2024
1 parent 5527694 commit 7876274
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/chatdbg/chatdbg_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,12 @@ def _is_user_frame(self, frame):
def _is_user_file(self, file_name):
if file_name.endswith(".pyx"):
return False
elif file_name == "<string>":
elif file_name == "<string>" or file_name.startswith('<frozen'):
# synthetic entry point or frozen modules
return False
elif file_name.startswith('<ipython'):
# stdin from ipython session
return True

for path in self._library_paths:
if os.path.commonpath([file_name, path]) == path:
Expand Down

0 comments on commit 7876274

Please sign in to comment.