From 415560ed2668781c1eaceff92abb5b0bbd0bcd4b Mon Sep 17 00:00:00 2001 From: MichaelSun48 Date: Fri, 12 Apr 2024 15:42:39 -0700 Subject: [PATCH] Fix typing error --- src/sentry/integrations/utils/code_mapping.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sentry/integrations/utils/code_mapping.py b/src/sentry/integrations/utils/code_mapping.py index 3740c8d5451722..1fa799eda29313 100644 --- a/src/sentry/integrations/utils/code_mapping.py +++ b/src/sentry/integrations/utils/code_mapping.py @@ -61,8 +61,9 @@ class UnsupportedFrameFilename(Exception): class FrameFilename: def __init__(self, frame_file_path: str) -> None: self.raw_path = frame_file_path - + is_windows_path = False if "\\" in frame_file_path: + is_windows_path = True frame_file_path = frame_file_path.replace("\\", "/") if frame_file_path[0] == "/" or frame_file_path[0] == "\\": @@ -83,7 +84,7 @@ def __init__(self, frame_file_path: str) -> None: raise UnsupportedFrameFilename("It needs an extension.") # Remove drive letter if it exists - if self.is_windows_path and frame_file_path[1] == ":": + if is_windows_path and frame_file_path[1] == ":": frame_file_path = frame_file_path[2:] start_at_index = get_straight_path_prefix_end_index(frame_file_path)