|
24 | 24 | patch.apply() |
25 | 25 |
|
26 | 26 | import typer # noqa: E402 |
27 | | -from typer.core import MarkupMode # noqa: E402 |
| 27 | +import typer.core # noqa: E402 |
28 | 28 | from typer.core import TyperCommand as CoreTyperCommand # noqa: E402 |
29 | 29 | from typer.core import TyperGroup as CoreTyperGroup # noqa: E402 |
30 | 30 | from typer.main import get_command as get_typer_command # noqa: E402 |
|
61 | 61 | from typing import ParamSpec |
62 | 62 |
|
63 | 63 |
|
| 64 | +DEFAULT_MARKUP_MODE = getattr(typer.core, "DEFAULT_MARKUP_MODE", None) |
| 65 | + |
| 66 | + |
64 | 67 | __all__ = [ |
65 | 68 | "TyperCommand", |
66 | 69 | "CommandNode", |
@@ -895,7 +898,7 @@ def __init__( |
895 | 898 | deprecated: bool = Default(False), |
896 | 899 | add_completion: bool = True, |
897 | 900 | # Rich settings |
898 | | - rich_markup_mode: MarkupMode = None, |
| 901 | + rich_markup_mode: typer.core.MarkupMode = Default(DEFAULT_MARKUP_MODE), |
899 | 902 | rich_help_panel: t.Union[str, None] = Default(None), |
900 | 903 | pretty_exceptions_enable: bool = True, |
901 | 904 | pretty_exceptions_show_locals: bool = True, |
@@ -1875,7 +1878,7 @@ def __new__( |
1875 | 1878 | add_help_option: bool = Default(True), |
1876 | 1879 | hidden: bool = Default(False), |
1877 | 1880 | deprecated: bool = Default(False), |
1878 | | - rich_markup_mode: MarkupMode = None, |
| 1881 | + rich_markup_mode: typer.core.MarkupMode = Default(DEFAULT_MARKUP_MODE), |
1879 | 1882 | rich_help_panel: t.Union[str, None] = Default(None), |
1880 | 1883 | pretty_exceptions_enable: t.Union[DefaultPlaceholder, bool] = Default(True), |
1881 | 1884 | pretty_exceptions_show_locals: t.Union[DefaultPlaceholder, bool] = Default( |
|
0 commit comments