@@ -326,7 +326,7 @@ def r(name: str, default: bool | int | str | list | dict) -> None:
326
326
327
327
set_debug_logging (self .log_debug )
328
328
329
- def highlight_style_region_flags (self , style_str : str ) -> tuple [int , int ]:
329
+ def highlight_style_region_flags (self , style_str : str ) -> tuple [sublime . RegionFlags , sublime . RegionFlags ]:
330
330
default = sublime .NO_UNDO
331
331
if style_str in ("background" , "fill" ): # Backwards-compatible with "fill"
332
332
style = default | sublime .DRAW_NO_OUTLINE
@@ -339,7 +339,7 @@ def highlight_style_region_flags(self, style_str: str) -> tuple[int, int]:
339
339
return default | sublime .DRAW_NO_FILL , default | sublime .DRAW_NO_FILL | sublime .DRAW_NO_OUTLINE | sublime .DRAW_SOLID_UNDERLINE # noqa: E501
340
340
341
341
@staticmethod
342
- def _style_str_to_flag (style_str : str ) -> int | None :
342
+ def _style_str_to_flag (style_str : str ) -> sublime . RegionFlags | None :
343
343
default = sublime .DRAW_EMPTY_AS_OVERWRITE | sublime .DRAW_NO_FILL | sublime .NO_UNDO
344
344
# This method could be a dict or lru_cache
345
345
if style_str == "" :
@@ -355,13 +355,13 @@ def _style_str_to_flag(style_str: str) -> int | None:
355
355
# default style (includes NO_UNDO)
356
356
return None
357
357
358
- def diagnostics_highlight_style_flags (self ) -> list [int | None ]:
358
+ def diagnostics_highlight_style_flags (self ) -> list [sublime . RegionFlags | None ]:
359
359
"""Returns flags for highlighting diagnostics on single lines per severity"""
360
360
if isinstance (self .diagnostics_highlight_style , str ):
361
361
# same style for all severity levels
362
362
return [self ._style_str_to_flag (self .diagnostics_highlight_style )] * 4
363
363
elif isinstance (self .diagnostics_highlight_style , dict ):
364
- flags : list [int | None ] = []
364
+ flags : list [sublime . RegionFlags | None ] = []
365
365
for sev in ("error" , "warning" , "info" , "hint" ):
366
366
user_style = self .diagnostics_highlight_style .get (sev )
367
367
if user_style is None : # user did not provide a style
0 commit comments