@@ -1223,24 +1223,17 @@ def pwarning(
1223
1223
msg : Any = '' ,
1224
1224
* ,
1225
1225
end : str = '\n ' ,
1226
- apply_style : bool = True ,
1227
1226
paged : bool = False ,
1228
1227
chop : bool = False ,
1229
1228
) -> None :
1230
1229
"""Wraps perror, but applies ansi.style_warning by default
1231
1230
1232
1231
:param msg: object to print
1233
1232
:param end: string appended after the end of the message, default a newline
1234
- :param apply_style:
1235
- If True, then ansi.style_warning will be applied to the message text. Set to False in cases
1236
- where the message text already has the desired style. Defaults to True.
1237
-
1238
- .. deprecated: 2.4.4
1239
- Use :meth:`~cmd2.Cmd.print_to` instead to print to stderr without style applied.
1240
1233
:param paged: If True, pass the output through the configured pager.
1241
1234
:param chop: If paged is True, True to truncate long lines or False to wrap long lines.
1242
1235
"""
1243
- self .print_to (sys .stderr , msg , end = end , style = ansi .style_warning if apply_style else None , paged = paged , chop = chop )
1236
+ self .print_to (sys .stderr , msg , end = end , style = ansi .style_warning , paged = paged , chop = chop )
1244
1237
1245
1238
def pfailure (
1246
1239
self ,
@@ -2437,7 +2430,7 @@ def sigint_handler(self, signum: int, _: FrameType) -> None:
2437
2430
if raise_interrupt :
2438
2431
self ._raise_keyboard_interrupt ()
2439
2432
2440
- def sigterm_handler (self , signum : int , _ : FrameType ) -> None :
2433
+ def sigterm_handler (self , signum : int , _ : FrameType ) -> None : # pragma: no cover
2441
2434
"""
2442
2435
Signal handler for SIGTERMs which are sent to politely ask this app to terminate.
2443
2436
@@ -2449,7 +2442,7 @@ def sigterm_handler(self, signum: int, _: FrameType) -> None:
2449
2442
# Gracefully exit so the persistent history file will be written.
2450
2443
sys .exit (self .exit_code )
2451
2444
2452
- def sighup_handler (self , signum : int , _ : FrameType ) -> None :
2445
+ def sighup_handler (self , signum : int , _ : FrameType ) -> None : # pragma: no cover
2453
2446
"""
2454
2447
Signal handler for SIGHUPs which are sent when the terminal is closed.
2455
2448
0 commit comments