From a5a3966ecc50cf0810d36586e340e6cba776aef5 Mon Sep 17 00:00:00 2001 From: "Natalia.Murycheva" Date: Fri, 13 Jun 2025 15:07:31 +0200 Subject: [PATCH] [Debugger] PY-81950 Flaky error: AttributeError: 'tuple' object has no attribute 'startswith' #PY-81950 Ready for Merge * Added additional type-check in the is_real_file function GitOrigin-RevId: 8cec0ce0ce98eba7fce2c75a1352675e36b84d87 --- python/helpers/pydev/_pydevd_bundle/pydevd_comm.py | 2 +- python/helpers/pydev/pydevd_file_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py b/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py index 94d1f5e118e5..c05ea0422bbd 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_comm.py @@ -742,7 +742,7 @@ class NetCommandFactory: else: my_file = abs_path_real_path_and_base[0] - if is_real_file(my_file) and not is_jup_cell: + if not is_jup_cell and is_real_file(my_file): # if filename is Jupyter cell id my_file = pydevd_file_utils.norm_file_to_client(abs_path_real_path_and_base[0]) diff --git a/python/helpers/pydev/pydevd_file_utils.py b/python/helpers/pydev/pydevd_file_utils.py index 1b3077109477..0e4c3aa153c9 100644 --- a/python/helpers/pydev/pydevd_file_utils.py +++ b/python/helpers/pydev/pydevd_file_utils.py @@ -556,7 +556,7 @@ def _is_int(filename): def is_real_file(filename): # Check for Jupyter cells - return not _is_int(filename) and not filename.startswith("