nb_cli.prompts.list

class ListPrompt(question, choices, question_mark='[?]', pointer='❯', annotation='(Use ↑ and ↓ to choose, Enter to submit)', max_height=None)

  • 说明

    RadioList Prompt that supports auto scrolling.

    Style class guide:

    [?] Choose a choice and return? (Use ↑ and ↓ to choose, Enter to submit)
    └┬┘ └──────────────┬──────────┘ └────────────────────┬─────────────────┘
    questionmark question annotation

    ❯ choice selected
    └┬┘ └───────┬─────┘
    pointer selected

    choice unselected
    └───────┬───────┘
    unselected
  • 参数

    • question (str)

    • choices (list[Choice[(~ RT)]])

    • question_mark (str)

    • pointer (str)

    • annotation (str)

    • max_height (int | None)

property max_height

  • 类型: int