MCPcopy
hub / github.com/Textualize/rich / __init__

Method __init__

rich/prompt.py:54–76  ·  rich/prompt.py::PromptBase.__init__
(
        self,
        prompt: TextType = "",
        *,
        console: Optional[Console] = None,
        password: bool = False,
        choices: Optional[List[str]] = None,
        case_sensitive: bool = True,
        show_default: bool = True,
        show_choices: bool = True,
    )

Source from the content-addressed store, hash-verified

52 choices: Optional[List[str]] = None
53
54 def __init__(
55 self,
56 prompt: TextType = class="st">"",
57 *,
58 console: Optional[Console] = None,
59 password: bool = False,
60 choices: Optional[List[str]] = None,
61 case_sensitive: bool = True,
62 show_default: bool = True,
63 show_choices: bool = True,
64 ) -> None:
65 self.console = console or get_console()
66 self.prompt = (
67 Text.from_markup(prompt, style=class="st">"prompt")
68 if isinstance(prompt, str)
69 else prompt
70 )
71 self.password = password
72 if choices is not None:
73 self.choices = choices
74 self.case_sensitive = case_sensitive
75 self.show_default = show_default
76 self.show_choices = show_choices
77
78 @classmethod
79 @overload

Callers

nothing calls this directly

Calls 2

get_consoleFunction · 0.85
from_markupMethod · 0.80

Tested by

no test coverage detected