Skip to content

Commit e513993

Browse files
committed
Remove colour support
1 parent 6b72110 commit e513993

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

sphinx/_cli/__init__.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,6 @@ def _create_parser() -> _RootArgumentParser:
207207
const=-2,
208208
help=__('No output at all'),
209209
)
210-
parser.add_argument(
211-
'--colour', '--color',
212-
choices=('auto', 'yes', 'no'),
213-
default='auto',
214-
help=__('Emit coloured output to the terminal, if supported'),
215-
)
216210

217211
parser.add_argument(
218212
'COMMAND',
@@ -228,7 +222,7 @@ def _parse_command(argv: Sequence[str] = ()) -> tuple[str, Sequence[str]]:
228222
command_name, *command_argv = args.COMMAND or ('help',)
229223
command_name = command_name.lower()
230224

231-
if args.colour == 'yes' or (args.colour == 'auto' and terminal_supports_colour()):
225+
if terminal_supports_colour():
232226
enable_colour()
233227
else:
234228
disable_colour()

0 commit comments

Comments
 (0)