File tree Expand file tree Collapse file tree 2 files changed +3
-22
lines changed Expand file tree Collapse file tree 2 files changed +3
-22
lines changed Original file line number Diff line number Diff line change 11
11
from typing import TYPE_CHECKING
12
12
from typing import Any
13
13
from typing import Callable
14
- from typing import Literal
15
14
16
15
from rich .console import Console
17
16
from rich .console import RenderableType
55
54
]
56
55
57
56
58
- IS_WINDOWS_TERMINAL = "WT_SESSION" in os .environ
57
+ _IS_WINDOWS_TERMINAL = "WT_SESSION" in os .environ
59
58
_IS_WINDOWS = sys .platform == "win32"
60
59
61
60
62
- _IS_LEGACY_WINDOWS = _IS_WINDOWS and not IS_WINDOWS_TERMINAL
63
-
64
-
65
- _COLOR_SYSTEM : Literal ["auto" ] | None = None if _IS_LEGACY_WINDOWS else "auto"
61
+ _IS_LEGACY_WINDOWS = _IS_WINDOWS and not _IS_WINDOWS_TERMINAL
66
62
67
63
68
64
_HORIZONTAL_PADDING = (0 , 1 , 0 , 1 )
108
104
)
109
105
110
106
111
- console : Console = Console (theme = theme , color_system = _COLOR_SYSTEM )
107
+ console : Console = Console (theme = theme )
112
108
113
109
114
110
def render_to_string (
Original file line number Diff line number Diff line change 5
5
import contextlib
6
6
import platform
7
7
import sys
8
- import warnings
9
8
from typing import TYPE_CHECKING
10
9
from typing import Any
11
10
from typing import NamedTuple
16
15
17
16
import _pytask
18
17
from _pytask .capture_utils import ShowCapture
19
- from _pytask .console import IS_WINDOWS_TERMINAL
20
18
from _pytask .console import console
21
19
from _pytask .pluginmanager import hookimpl
22
20
from _pytask .reports import ExecutionReport
@@ -52,19 +50,6 @@ def pytask_extend_command_line_interface(cli: click.Group) -> None:
52
50
cli .commands ["build" ].params .append (show_locals_option )
53
51
54
52
55
- @hookimpl
56
- def pytask_parse_config (config : dict [str , Any ]) -> None :
57
- """Parse configuration."""
58
- if config ["editor_url_scheme" ] not in ("no_link" , "file" ) and IS_WINDOWS_TERMINAL :
59
- config ["editor_url_scheme" ] = "file"
60
- warnings .warn (
61
- "Windows Terminal does not support url schemes to applications, yet."
62
- "See https://github.com/pytask-dev/pytask/issues/171 for more information. "
63
- "Resort to `editor_url_scheme='file'`." ,
64
- stacklevel = 1 ,
65
- )
66
-
67
-
68
53
@hookimpl
69
54
def pytask_post_parse (config : dict [str , Any ]) -> None :
70
55
# Set class variables on traceback object.
You can’t perform that action at this time.
0 commit comments