TypeCheck underline style names
This commit is contained in:
parent
d4e7587686
commit
08f159c2ba
@ -5,13 +5,13 @@ import sys
|
|||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from enum import Enum, auto
|
from enum import Enum, auto
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from typing import (
|
from typing import IO, Any, Callable, Dict, Generator, Optional, TypeVar, Union
|
||||||
IO, Any, Callable, Dict, Generator, Optional, TypeVar, Union
|
|
||||||
)
|
|
||||||
|
|
||||||
from kitty.fast_data_types import Color
|
from kitty.fast_data_types import Color
|
||||||
from kitty.rgb import color_as_sharp, to_color
|
from kitty.rgb import color_as_sharp, to_color
|
||||||
from kitty.typing import GraphicsCommandType, HandlerType, ScreenSize
|
from kitty.typing import (
|
||||||
|
GraphicsCommandType, HandlerType, ScreenSize, UnderlineLiteral
|
||||||
|
)
|
||||||
|
|
||||||
from .operations_stub import CMD
|
from .operations_stub import CMD
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ def styled(
|
|||||||
bg_intense: bool = False,
|
bg_intense: bool = False,
|
||||||
italic: Optional[bool] = None,
|
italic: Optional[bool] = None,
|
||||||
bold: Optional[bool] = None,
|
bold: Optional[bool] = None,
|
||||||
underline: Optional[str] = None,
|
underline: Optional[UnderlineLiteral] = None,
|
||||||
underline_color: Optional[ColorSpec] = None,
|
underline_color: Optional[ColorSpec] = None,
|
||||||
reverse: Optional[bool] = None,
|
reverse: Optional[bool] = None,
|
||||||
dim: Optional[bool] = None,
|
dim: Optional[bool] = None,
|
||||||
|
|||||||
@ -17,6 +17,7 @@ TermManagerType = LoopType = Debug = GraphicsCommandType = None
|
|||||||
CompletedProcess = Tuple
|
CompletedProcess = Tuple
|
||||||
TypedDict = dict
|
TypedDict = dict
|
||||||
EdgeLiteral = str
|
EdgeLiteral = str
|
||||||
|
UnderlineLiteral = str
|
||||||
PowerlineStyle = str
|
PowerlineStyle = str
|
||||||
MatchType = str
|
MatchType = str
|
||||||
Protocol = object
|
Protocol = object
|
||||||
|
|||||||
@ -33,6 +33,7 @@ from .utils import ScreenSize as ScreenSize
|
|||||||
from .window import Window as WindowType
|
from .window import Window as WindowType
|
||||||
|
|
||||||
EdgeLiteral = Literal['left', 'top', 'right', 'bottom']
|
EdgeLiteral = Literal['left', 'top', 'right', 'bottom']
|
||||||
|
UnderlineLiteral = Literal['straight', 'double', 'curly', 'dotted', 'dashed']
|
||||||
MatchType = Literal['mime', 'ext', 'protocol', 'file', 'path', 'url', 'fragment_matches']
|
MatchType = Literal['mime', 'ext', 'protocol', 'file', 'path', 'url', 'fragment_matches']
|
||||||
PowerlineStyle = Literal['angled', 'slanted', 'round']
|
PowerlineStyle = Literal['angled', 'slanted', 'round']
|
||||||
GRT_a = Literal['t', 'T', 'q', 'p', 'd', 'f', 'a', 'c', 'q']
|
GRT_a = Literal['t', 'T', 'q', 'p', 'd', 'f', 'a', 'c', 'q']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user